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

Motivation behind PERL5LIB and PERLLIB?

by osunderdog (Deacon)
on Apr 18, 2005 at 15:06 UTC ( #448909=perlquestion: print w/replies, xml ) Need Help??

osunderdog has asked for the wisdom of the Perl Monks concerning the following question:

I've been looking through Super Search this morning for some information on this, but haven't found anything definitive, so I thought I would just ask.

The docs in perldoc perlrun describe two environment variables PERL5LIB and PERLLIB.

As far as I can tell from the documentation, the key difference between the two environment variables is that if PERL5LIB is set it overrides PERLLIB. However, the PERL5LIB definition also mentions:

Any architecture-specific directories under the specified locations ar +e automatically included if they exist.

Based on this, I have a few questions:

  • Is this statement true for PERLLIB as well or is it a key difference between the two environment variables?
  • When would you choose to set PERL5LIB over PERLLIB? Since they are both environment variables, couldn't you just override the PERLLIB environment variable as needed?
  • Is the distinction necessary on some platforms but not on others?

Any clarification would be appreciated.

Plaques don't hang well on cube walls

Replies are listed 'Best First'.
Re: Motivation behind PERL5LIB and PERLLIB?
by salva (Canon) on Apr 18, 2005 at 15:20 UTC
    If I remember correctly, PERLLIB was used on perl4 and when perl5 went out, support for PERL5LIB was added so the user could define different lib paths for both perl4 and perl5 from the same shell/session.

    PERLLIB is obsolete, use PERL5LIB

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://448909]
Approved by Joost
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2022-11-29 22:04 GMT
Find Nodes?
    Voting Booth?