Data-Hive

 view release on metacpan or  search on metacpan

lib/Data/Hive/PathPacker/Flexible.pm  view on Meta::CPAN

use strict;
use warnings;
package Data::Hive::PathPacker::Flexible 1.015;
# ABSTRACT: a path packer that can be customized with callbacks

use parent 'Data::Hive::PathPacker';

#pod =head1 DESCRIPTION
#pod
#pod This class provides the Data::Hive::PathPacker interface, and the way in which
#pod paths are packed and unpacked can be defined by callbacks set during
#pod initialization.
#pod
#pod =method new
#pod
#pod   my $path_packer = Data::Hive::PathPacker::Flexible->new( \%arg );
#pod
#pod The valid arguments are:
#pod
#pod =begin :list
#pod
#pod = escape and unescape
#pod
#pod These coderefs are used to escape and path parts so that they can be split and
#pod joined without ambiguity.  The callbacks will be called like this:
#pod
#pod   my $result = do {
#pod     local $_ = $path_part;
#pod     $store->$callback( $path_part );
#pod   }
#pod
#pod The default escape routine uses URI-like encoding on non-word characters.
#pod
#pod = join, split, and separator
#pod

lib/Data/Hive/PathPacker/Flexible.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Data::Hive::PathPacker::Flexible - a path packer that can be customized with callbacks

=head1 VERSION

version 1.015

=head1 DESCRIPTION

This class provides the Data::Hive::PathPacker interface, and the way in which
paths are packed and unpacked can be defined by callbacks set during
initialization.

=head1 PERL VERSION

This library should run on perls released even a long time ago.  It should work
on any version of perl released in the last five years.

Although it may work on older versions of perl, no guarantee is made that the
minimum required version will not be increased.  The version may be increased
for any reason, and there is no promise that patches will be accepted to lower

lib/Data/Hive/PathPacker/Flexible.pm  view on Meta::CPAN


  my $path_packer = Data::Hive::PathPacker::Flexible->new( \%arg );

The valid arguments are:

=over 4

=item escape and unescape

These coderefs are used to escape and path parts so that they can be split and
joined without ambiguity.  The callbacks will be called like this:

  my $result = do {
    local $_ = $path_part;
    $store->$callback( $path_part );
  }

The default escape routine uses URI-like encoding on non-word characters.

=item join, split, and separator



( run in 0.278 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )