Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
laziness, impatience, and hubris
 
PerlMonks  

Re: Add directry to @INC system wide

by vinoth.ree (Vicar)
on Mar 06, 2013 at 05:33 UTC ( #1021955=note: print w/ replies, xml ) Need Help??


in reply to Add directry to @INC system wide

kielstirling ++

I am also using the same method, here it is,

use File::Spec::Functions qw(catdir splitdir canonpath); use FindBin qw($RealBin); BEGIN { my @dirs = splitdir(canonpath($RealBin)); my($path) = grep { -e $_ } ( map { $_ = catdir(@dirs[0 .. $#dirs - + $_]).'/bin/new/' } (0 .. $#dirs) ); unshift(@INC, $RealBin, $path); }


Comment on Re: Add directry to @INC system wide
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-04-20 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls