Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 scrutinizing the Monastery: (6)
As of 2014-12-27 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls