Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

where are my packages found ?

by didess (Sexton)
on Oct 05, 2011 at 11:07 UTC ( [id://929758]=perlquestion: print w/replies, xml ) Need Help??

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

Hi all monks !

Is there any way to know which file has been found and loaded from @INC, after a "use" or "require" ?

For example, if I "use myPack;" I'd like to print "Package myPack was in file "....";

Thanks for your help !

Didess

Replies are listed 'Best First'.
Re: where are my packages found ?
by Anonymous Monk on Oct 05, 2011 at 11:15 UTC
      That's great ! Thank you
Re: where are my packages found ?
by zentara (Archbishop) on Oct 05, 2011 at 15:02 UTC
    For a quick locater, you can use perldoc's -l option:
    perldoc -l CGI
    gives
    /usr/lib/perl5/5.14.1/CGI.pm
    

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
Re: where are my packages found ?
by Anonymous Monk on Oct 05, 2011 at 11:20 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://929758]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-25 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found