Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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.

Comment on Re: Add directry to @INC system wide
Download Code
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 about the Monastery: (12)
As of 2015-11-30 18:23 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (778 votes), past polls