srinigs has asked for the wisdom of the Perl Monks concerning the following question:
I have specified "use lib path2" but it still always picks up the one at path1. The code is something like 'eval "use P4";' somewhere in the middle of the script (not written by me) and to debug I have added the following just before the eval statement:
This print always gives path1. I also tried unshift ("path2", @INC) before eval, to make sure it is available right at the beginning of the array but it still ends up picking path1. Just to check I removed path1 from @INC and surprisingly the print statement still gives "path1"!if (require "P4.pm") { print "$INC{"P4.pm"}; }
How do I go about achieving what I have specified at the top?Kindly help.
Also, moving around the modules to the right location or leaving out one of the paths is not an option :(Thanks much,
srinigs
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Picking up a module from a specific location
by kcott (Archbishop) on Sep 11, 2012 at 06:50 UTC | |
|
Re: Picking up a module from a specific location
by srinigs (Novice) on Sep 11, 2012 at 08:20 UTC | |
|
Re: Picking up a module from a specific location
by Anonymous Monk on Sep 11, 2012 at 07:06 UTC |