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.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Env::Path 0.18

    Download button

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

    License / Price:

    Last Updated:

    Category:
    David Boyce | More programs
    Perl Artistic License / FREE
    April 14th, 2007, 07:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Env::Path description

    Env::Path is a Perl module with advanced operations on path variables.

    Env::Path is a Perl module with advanced operations on path variables.

    SYNOPSIS

    use Env::Path;

    # basic usage
    my $manpath = Env::Path->MANPATH;
    $manpath->Append('/opt/samba/man');
    for ($manpath->List) { print $_, "n" };

    # similar to above using the "implicit object" shorthand
    Env::Path->MANPATH;
    MANPATH->Append('/opt/samba/man');
    for (MANPATH->List) { print $_, "n" };

    # one-shot use
    Env::Path->PATH->Append('/usr/sbin');

    # change instances of /usr/local/bin to an architecture-specific dir
    Env::Path->PATH->Replace('/usr/local/bin', "/usr/local/$ENV{PLATFORM}/bin");

    # more complex use (different names for same semantics)
    my $libpath;
    if ($^O =~ /aix/) {
    $libpath = Env::Path->LIBPATH;
    } else {
    $libpath = Env::Path->LD_LIBRARY_PATH;
    }
    $libpath->Assign(qw(/usr/lib /usr/openwin/lib));
    $libpath->Prepend('/usr/ucblib') unless $libpath->Contains('/usr/ucblib');
    $libpath->InsertAfter('/usr/ucblib', '/xx/yy/zz');
    $libpath->Uniqify;
    $libpath->DeleteNonexistent;
    $libpath->Remove('/usr/local/lib');
    print $libpath->Name, ":";
    for ($libpath->List) { print " $_" };
    print "n";

    # simplest usage: bless all existing EV's as Env::Path objects
    use Env::Path ':all';
    my @cats = PATH->Whence('cat*');
    print "@catsn";

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    path variables | advanced operations | Perl module | Env::Path | path | variables

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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