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 > Perl Modules

    FindBin::libs 1.64

    Download button

    No screenshots available
    Downloads: 429  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.2/5)
    7 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Steven Lembark | More programs
    Perl Artistic License / FREE
    April 7th, 2012, 06:19 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    FindBin::libs description

    Locate and 'use lib' directories along the path of $FindBin::Bin to automate locating modules

    FindBin::libs is a Perl module used to locate and 'use lib' directories along the path of $FindBin::Bin to automate locating modules. Uses File::Spec and Cwd's abs_path to accomodate multiple O/S and redundant symlinks.

    SYNOPSIS

    # search up $FindBin::Bin looking for ./lib directories
    # and "use lib" them.

    use FindBin::libs;

    # same as above with explicit defaults.

    use FindBin::libs qw( base=lib use noexport noprint );

    # print the lib dir's before using them.

    use FindBin::libs qw( print );

    # find and use lib "altlib" dir's

    use FindBin::libs qw( base=altlib );

    # move starting point from $FindBin::Bin to '/tmp'

    use FindBin::libs qw( Bin=/tmp base=altlib );

    # skip "use lib", export "@altlib" instead.

    use FindBin::libs qw( base=altlib export );

    # find altlib directories, use lib them and export @mylibs

    use FindBin::libs qw( base=altlib export=mylibs use );

    # "export" defaults to "nouse", these two are identical:

    use FindBin::libs qw( export nouse );
    use FindBin::libs qw( export );

    # use and export are not exclusive:

    use FindBin::libs qw( use export ); # do both
    use FindBin::libs qw( nouse noexport print ); # print only
    use FindBin::libs qw( nouse noexport ); # do nothting at all

    # print a few interesting messages about the
    # items found.

    use FindBinlibs qw( verbose );

    # turn on a breakpoint after the args are prcoessed, before
    # any search/export/use lib is handled.

    use FindBin::libs qw( debug );

    # prefix PERL5LIB with the lib's found.

    use FindBin::libs qw( perl5lib );

    # find a subdir of the lib's looked for.
    # the first example will use both ../lib and
    # ../lib/perl5; the second ../lib/perl5/frobnicate
    # (if they exist). it can also be used with export
    # and base to locate special configuration dir's.
    #
    # subonly with a base is useful for locating config
    # files. this finds any "./config/mypackage" dir's
    # without including any ./config dir's. the result
    # ends up in @config (see also "export=", above).

    use FindBin::libs qw( subdir=perl5 );

    use FindBin::libs qw( subdir=perl5/frobnicate );

    use FindBin::libs qw( base=config subdir=mypackage subonly export );


    General Use

    This module will locate directories along the path to $FindBin::Bin and "use lib" or export an array of the directories found. The default is to locate "lib" directories and "use lib" them without printing the list.

    Options controll whether the lib's found are exported into the caller's space, exported to PERL5LIB, or printed. Exporting or setting perl5lib will turn off the default of "use lib" so that:

    use FindBin::libs qw( export );
    use FindBin::libs qw( p5lib );


    are equivalent to

    use FindBin::libs qw( export nouse );
    use FindBin::libs qw( p5lib nouse );


    Combining export with use or p5lib may be useful, p5lib and use are probably not all that useful together.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    locate modules | $FindBin::Bin path | Perl module | FindBin::libs | locate | modules

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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