The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

File::Box - Perl extension for blah blah blah

SYNOPSIS

  use File::Box;

  package Whatever;

   my $box = File::Box->new( mother_file => __FILE__, env => { SOURCE => '/home/path/src' } );

    # default 'boxdir' is under the module path is '.box'

    # 'env' registers path's used with 'request' below. Names are identified by an heading '__'.

    # ie. /home/Murat/checkout/perl/modules/File-Box/blib/lib/File/Box/.box
   println $box->path_home;

    # ie. path where the perl 'binary' has been called
   println $box->path_local;

    # ie. serve from path defined in 'env'; HOME and LOCAL are automatically created  

    # HOME is actually default, so next two calls will be identical
   println $box->request( 'bla.txt' );
   println $box->request( 'bla.txt', '__HOME' );

   println $box->request( 'bla.txt', '__LOCAL' );
   println $box->request( 'bla.txt', '__SOURCE' );

   # MyPath will be handled as the absolute path 
   println $box->request( 'bla.txt', 'MyPath' );

   println "failure causes undef !" if $box->request( 'bla.txt', '__UNKNOWN' );

DESCRIPTION

File::Box serves file path's. It was created to help serving non-module files (like textfiles/templates) in perl module directories and alike.

EXPORT

None by default.

SEE ALSO

Regexp::Box

AUTHOR

M. Uenalan, <muenalan@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by M. Uenalan

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.