Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^3: use lib statement with path variable

by Eily (Curate)
on Dec 04, 2013 at 19:55 UTC ( #1065644=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    # Compiling
    using File::Spec
    using File::Basename
    # Running
    $some_path = dirname(File::Spec->rel2abs(__FILE__));
  2. or download this
    my $some_path;
    BEGIN { 
       $some_path = "/my/path";
    use lib "$some_path/lib"; # Yeah, you don't even need the parenthesis,
    + Perl is clever enough for you
    # Edit : thanks dave_the_m for the correction

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1065644]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2015-07-06 13:29 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (74 votes), past polls