Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    File::PathList 0.02

    Download button

    No screenshots available
    Downloads: 337  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Adam Kennedy | More programs
    Perl Artistic License / FREE
    June 6th, 2007, 08:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    File::PathList description

    File::PathList is a Perl module that can find a file within a set of paths (like @INC or Java classpaths).

    File::PathList is a Perl module that can find a file within a set of paths (like @INC or Java classpaths).

    SYNOPSIS

    # Create a basic pathset
    my $inc = File::PathList->new( @INC );

    # Again, but with more explicit params
    my $inc2 = File::PathList->new(
    paths => @INC,
    cache => 1,
    );

    # Get the full (localised) path for a unix-style relative path
    my $file = "foo/bar/baz.txt";
    my $path = $inc->find_file( $file );

    if ( $path ) {
    print "Found '$file' at '$path'n";
    } else {
    print "Failed to find '$file'n";
    }

    Many systems that map generic relative paths to absolute paths do so with a set of base paths.

    For example, perl itself when loading classes first turn a Class::Name into a path like Class/Name.pm, and thens looks through each element of @INC to find the actual file.

    To aid in portability, all relative paths are provided as unix-style relative paths, and converted to the localised version in the process of looking up the path.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    find files | Java classpaths | Perl module | File::PathList | finder | @INC

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM