Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Overriding default libs

by tobyink (Abbot)
on Nov 15, 2012 at 13:30 UTC ( #1004010=note: print w/replies, xml ) Need Help??


in reply to Overriding default libs

Are you sure threads.pm is in "/tmp/custom_module"? Or is it in a subdirectory like "/tmp/custom_module/lib"?

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

Replies are listed 'Best First'.
Re^2: Overriding default libs
by xajin24 (Initiate) on Nov 15, 2012 at 13:35 UTC
    The exact path of the .pm file is: /tmp/custom_module/lib/perl5/x86_64-linux-thread-multi/threads.pm

      Then you should use lib "/tmp/custom_module/lib/perl5";. (Perl should be able to guess the "x86_64-linux-thread-multi" bit.)

      perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
        That worked perfectly, Thanks. How deep(how many sub-directory levels) does perl look when given a path for  use lib /path/... ?
      use lib '/tmp/custom_module/lib/perl5/x86_64-linux-thread-multi/';
        No,  use lib '/tmp/custom_module/lib/perl5';

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004010]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2016-12-09 02:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (148 votes). Check out past polls.