Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
There's more than one way to do things
 
PerlMonks  

Re: Utility of "use lib qw{ . }" ?

by Lachesis (Friar)
on Jun 23, 2003 at 14:00 UTC ( #268162=note: print w/ replies, xml ) Need Help??


in reply to Utility of "use lib qw{ . }" ?

. will be the last element of @INC which means that all though it will always be checked, it will be the last path checked for any modules.
if you call

use lib '.';
. will be unshifted onto the front of @INC which means it will be checked first so you know that any modules in the current path will take precedence.


Comment on Re: Utility of "use lib qw{ . }" ?
Download Code
(jeffa) 2Re: Utility of "use lib qw{ . }" ?
by jeffa (Chancellor) on Jun 23, 2003 at 14:30 UTC
    Exactly. I just wanted to follow this up with a demonstration that everyone can try at home:
    perl -le"print for @INC" perl -Mlib=. -le"print for @INC"
    Notice the placement of .

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-04-16 05:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (414 votes), past polls