Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
more useful options
 
PerlMonks  

Re: New module usage

by TheoPetersen (Priest)
on Feb 22, 2001 at 20:33 UTC ( [id://60342]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to New module usage

While I don't disagree with use lib or adding -I to the shebang line, you might consider using the PERL5LIB environment variable instead, especially if the situation is temporary and you are going to install your changes system-wide eventually.

By using the environment variable you don't have to remember to pull the switch or use statement out of your code. I've preferred it that way since I had a puzzling error caused by an old copy of a module I left in a directory long after I was finished with it.

See also perlman:perlrun

Replies are listed 'Best First'.
Re: Re: New module usage
by petral (Curate) on Feb 23, 2001 at 04:58 UTC
    Also, adding the _full_directory_path_ to PERL5LIB means that your program will work even if you don't cd into its directory to run it.

    In short, put your test module _some_place (site_perl?), then make sure that's first in PERL5LIB for your login. Even if you eventually install it system wide, just remove the copy from your test directory, and you don't have to remember to change your PERL5LIB back.

    p
      If you're going to be doing this sort of thing a lot, then you might want to add '.' to the front of PER5LIB. Then you'll always look in the local directory first.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://60342]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.