Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Get module's location savely?

by Bloodnok (Vicar)
on Nov 12, 2009 at 11:53 UTC ( #806700=note: print w/ replies, xml ) Need Help??


in reply to Get module's location savely?

The recommended/standard way is to use, as cdarke says, the PERL5LIB ( or PERLLIB if your perl is old enough) environment variable - well that's how alternative location(s) are specified to perl in a code independent manner.

How ever, if, as your question implies, you need to know from whence a library was loaded, use the global hash %INC - see Predefined Names for further details.

A user level that continues to overstate my experience :-))


Comment on Re: Get module's location savely?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2015-07-04 04:19 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 (57 votes), past polls