Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Add directry to @INC system wide

by kielstirling (Scribe)
on Mar 06, 2013 at 05:00 UTC ( #1021949=note: print w/replies, xml ) Need Help??

in reply to Add directry to @INC system wide

I add the following to my programs
use FindBin qw($Bin); use lib "$Bin/lib";

Then you can use any module(s) located in the ./lib directory.

Replies are listed 'Best First'.
Re^2: Add directry to @INC system wide
by ikegami (Pope) on Mar 07, 2013 at 00:55 UTC
    Using $RealBin instead of $Bin means your program won't break if you create a symlink to the script.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2016-10-27 18:51 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (369 votes). Check out past polls.