One other option, for those not wanting to modify their scripts at all: The PERL5LIB environment variable. If you do this:
perl -e "print join(qq|:|, @INC)"
you'll get your current perl @INC array in a path format. If you set your PERL5LIB env var to the output of that one-liner and also tack your own custom libs on the end of it, this will have the effect of putting a copy of your @INC in front of your custom libs, even though your original @INC remains untouched (and unused) at runtime. When I do this, my PERL5LIB ends up looking like this (breaks added for readability):
/usr/lib/perl5/5.6.1/i386-linux:/usr/lib/perl5/5.6.1:
/usr/lib/perl5/site_perl/5.6.1/i386-linux:
/usr/lib/perl5/site_perl/5.6.1:/usr/lib/perl5/site_perl:.:
/home/jtillman/customlibdir/
It ends up doubling your original @INC path in memory, but as a temporary measure, it's much easier to reverse, since you have no code to modify. Just a thought...
jpt
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.