App-Framework

 view release on metacpan or  search on metacpan

lib/App/Framework/Base/SearchPath.pm  view on Meta::CPAN

package App::Framework::Base::SearchPath ;

=head1 NAME

App::Framework::Base::SearchPath - Searchable path

=head1 SYNOPSIS

use App::Framework::Base::SearchPath ;


=head1 DESCRIPTION

Provides a simple searchable path under which to locate files or directories. 

When trying the read a file/dir, looks in each location in the path stopping at the first found.

When writing a file/dir, attempts to write into each location in the path until can either (a) write, or (b) runs out of search path
 

=cut

use strict ;

our $VERSION = "1.000" ;

#============================================================================================
# USES
#============================================================================================
use File::Path ;

use App::Framework::Base::Object::ErrorHandle ;


#============================================================================================
# OBJECT HIERARCHY
#============================================================================================
our @ISA = qw(App::Framework::Base::Object::ErrorHandle) ; 

#============================================================================================
# GLOBALS
#============================================================================================

=head2 FIELDS

The following fields should be defined either in the call to 'new()', as part of a 'set()' call, or called by their accessor method
(which is the same name as the field):


=over 4

=item B<dir_mask> - directory creation mask

When the write_path is searched, any directories created are created using this mask [default = 0755]

=item B<env> - environment HASH ref

Any paths that contain variables have the variables expanded using the standard environment variables. Specifying
this HASH ref causes the variables to be replaced from this HASH before looking in the envrionment.

=item B<path> - search path

A comma seperated list (in scalar context), or an ARRAY ref list of paths to be searched (for a file)

=item B<write_path> - search path for writing

A comma seperated list (in scalar context), or an ARRAY ref list of paths to be searched (for a file) when writing. If not set, then
B<path> is used.


=back

=cut


my %FIELDS = (



( run in 0.872 second using v1.01-cache-2.11-cpan-39bf76dae61 )