Hi All,
I am quite a regular user of PERL and I found a strange problem with a module loading.
Basically, we have a module x.pm which is installed in the lib path of a particular perl installation.That is I am using perl-5.8.1 and it is installed as /proj/myself/bin/perl , then the module x.pm is installed in /proj/myself/lib/perl5/site_perl/5.8.1/x.pm (since I am using perl 5.8.1 ).
Now I have a script y.pl which uses x.pm module ie. y.pl would look something like this:
/proj/myself/bin/perl -w
use x;
Now while invocating this script,I want this module (x.pm i.e.) to be picked up from a different location,say /u/myself/somescrap/ directory.
So I would do something like this:
/proj/myself/bin/perl -I/u/myself/somescrap y.pl
and since -I unshifts @INC with the path specified,the module should be picked up from /u/myself/somescrap location right? (as long as it exist,right?)
But,alas,it is being picked up from the standard installed location /proj/myself/lib/perl5/site_perl/5.8.1/x.pm.
What I'd love to mention is that x.pm internally uses some more modules (say z.pm,a.pm,b.pm etc.) and some of these modules uses "Config" module.
My first impression is that Config module is doing some funda based on the path of the perl executable that we are using and is "forcing" x.pm to be picked up from its installed location.
Can someone help me out?
~Karthik
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.