Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: How to lay out private modules?

by dragonchild (Archbishop)
on May 11, 2005 at 15:42 UTC ( [id://456042]=note: print w/replies, xml ) Need Help??


in reply to Re: How to lay out private modules?
in thread How to lay out private modules?

Something you could use instead of use lib is the PERL5LIB environment variable...

They are exactly the same thing. One is on a per-user basis and the other is on a per-file basis. Which you use is dependent on your needs. Generally, 'use lib' is preferred precisely because it's user-independent.


  • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
  • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"

Replies are listed 'Best First'.
Re^3: How to lay out private modules?
by Animator (Hermit) on May 11, 2005 at 18:26 UTC

    Well, not exactly the same...

    If you move the script when you have 'use lib' then you might need to change the script... (ofcourse this is not true when the path of the modules-directory is relative to the path of the script path, but that's not always the case)

    And ofcourse one can argue wheter or not user-independene is required... if many users are using it then it might be better to put it in a INC-dir (in a subdirectory ofcourse)

    It all depends on one needs... which is why I mentioned it, since not everyone might know about the variable... (which would indicate that they didn't read (or skipped some parts) of the perlrun POD...)

Log In?
Username:
Password:

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

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

    No recent polls found