Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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.
-Kiel


Comment on Re: Add directry to @INC system wide
Download Code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2015-07-03 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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









    Results (57 votes), past polls