Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Howto set path for local package in a Perl code

by chibiryuu (Beadle)
on Jun 02, 2006 at 16:32 UTC ( [id://553331]=note: print w/replies, xml ) Need Help??


in reply to Re: Howto set path for local package in a Perl code
in thread Howto set path for local package in a Perl code

Example: Use FindBin and your script will work no matter where you move it and its modules together.
use FindBin; use lib "$FindBin::Bin"; use MyPackage;
use lib only adds the path to @INC, you still need to use MyPackage after it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-19 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found