Ricardo SIGNES > Data-Hive-1.011 > Data::Hive::PathPacker::Flexible

Download:
Data-Hive-1.011.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 1.011   Source   Latest Release: Data-Hive-1.012

NAME ^

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

VERSION ^

version 1.011

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.

METHODS ^

new

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

The valid arguments are:

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.

join, split, and separator

The join coderef is used to join pre-escaped path parts. split is used to split up a complete name before unescaping the parts.

By default, they will use a simple perl join and split on the character given in the separator option.

AUTHORS ^

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: