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

Re: How to lay out private modules?

by Animator (Hermit)
on May 11, 2005 at 15:35 UTC ( #456036=note: print w/replies, xml ) Need Help??


in reply to How to lay out private modules?

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

So far I've some modules which are in a directory which is part of the @INC, and some only in the directory of one of my projects... for some others I have a symlink in a @INC-dir point to another dir (which ofcourse isn't in the @INC)...

Replies are listed 'Best First'.
Re^2: How to lay out private modules?
by dragonchild (Archbishop) on May 11, 2005 at 15:42 UTC
    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?"

      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://456036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2023-05-31 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?