Data::Hive::PathPacker::Flexible - a path packer that can be customized with callbacks
version 1.015
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.
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 the minimum required perl.
my $path_packer = Data::Hive::PathPacker::Flexible->new( \%arg );
The valid arguments are:
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.
The join coderef is used to join pre-escaped path parts. split is used to split up a complete name before unescaping the parts.
join
split
By default, they will use a simple perl join and split on the character given in the separator option.
separator
Hans Dieter Pearcey <hdp@cpan.org>
Ricardo Signes <cpan@semiotic.systems>
This software is copyright (c) 2006 by Hans Dieter Pearcey.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Data::Hive, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Hive
CPAN shell
perl -MCPAN -e shell install Data::Hive
For more information on module installation, please visit the detailed CPAN module installation guide.