Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Add directry to @INC system wide

by kielstirling (Scribe)
on Mar 06, 2013 at 05:00 UTC ( [id://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

Replies are listed 'Best First'.
Re^2: Add directry to @INC system wide
by ikegami (Patriarch) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1021949]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-23 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found