Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Using Modules in a local directory

by jeroenes (Priest)
on Jul 10, 2001 at 16:41 UTC ( #95288=note: print w/ replies, xml ) Need Help??


in reply to Using Modules in a local directory

Hi Speedfreak,

If you put a perl module in the directory you call perl from, let's say /home/jeroenes/work as in:

cd /home/jeroenes/work perl /var/scripts/script1.pl mylocalfile.txt
Than perl searches the current/calling dir: /home/jeroenes/work for .pm modules. The use Blah::Foo; statement is seen as "look for Foo.pm in ./Blah/". So use Blah::Foo; will fetch /home/jeroenes/work/Blah/Foo.pm for you.

As for your second question, see the docs of ExtUtils::MakeMaker. In short, add a LIB directive to the commandline: perl Makefile.pm LIB=/home/jeroenes/work"

Hope this helps,

Jeroen
"We are not alone"(FZ)


Comment on Re: Using Modules in a local directory
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2015-07-08 02:00 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 (93 votes), past polls