Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^4: Overriding default libs

by xajin24 (Initiate)
on Nov 15, 2012 at 14:19 UTC ( #1004023=note: print w/ replies, xml ) Need Help??

in reply to Re^3: Overriding default libs
in thread Overriding default libs

That worked perfectly, Thanks. How deep(how many sub-directory levels) does perl look when given a path for  use lib /path/... ?

Comment on Re^4: Overriding default libs
Download Code
Replies are listed 'Best First'.
Re^5: Overriding default libs
by tobyink (Abbot) on Nov 15, 2012 at 14:24 UTC

    It doesn't look any levels down. If you:

    use lib "/tmp"; use Foo::Bar;

    ... then Perl will use "/tmp/Foo/", but not "/tmp/x/Foo/".

    The exception for your CPU architecture name (in your case "x86_64-linux-thread-multi") is due to some trickery by use lib which automatically detects those directories if they exist (and look like proper locations containing architecture-specific libraries), and unshifts two entries onto @INC instead of the normal one.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2015-11-26 01:01 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (695 votes), past polls