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

Re^3: use lib statement with path variable

by Eily (Vicar)
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1065644]
help
Chatterbox?
[Corion]: LanX: cmd.exe is just another way to launch Perl
[LanX]: I know its a cult... and I repent it every time
[LanX]: But cygwin comes with path problems and powershell requires too much learning for me
[LanX]: eshell in emacs is often my resort in development
[LanX]: Thx found a solution! :)
[Eily]: I wrote "your" instead of "you're" :'(
[Eily]: I guess it means that my English is good enough that I make the same mistakes as native speakers though :/

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-03-27 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.