[TriLUG] Perl include path problem
Jeremy Portzer
jeremyp at pobox.com
Mon Apr 28 15:06:06 EDT 2003
Anyone seen problems with Perl respecting the -I option for include
path? It appears to work fine with "-V" but then barfs when I actually
try to run a Perl script.
For example, I run this:
bash$ /home/foo/apps/perl/bin/perl -I/home/foo/apps/perl/lib -V
[snippity-snip]
@INC:
/home/foo/apps/perl/lib/5.6.1/i686-linux
/home/foo/apps/perl/lib/5.6.1
/home/foo/apps/perl/lib
/usr/local/foo/apps/perl/lib/5.6.1/i686-linux
/usr/local/foo/apps/perl/lib/5.6.1
/usr/local/foo/apps/perl/lib/site_perl/5.6.1/i686-linux
/usr/local/foo/apps/perl/lib/site_perl/5.6.1
/usr/local/foo/apps/perl/lib/site_perl
.
bash$ /home/foo/apps/perl/bin/perl -I/home/foo/apps/perl/lib
migration.pl -v
Can't locate strict.pm in @INC (@INC contains:
/usr/local/foo/apps/perl/lib/5.6.1/i686-linux
/usr/local/foo/apps/perl/lib/5.6.1
/usr/local/foo/apps/perl/lib/site_perl/5.6.1/i686-linux
/usr/local/foo/apps/perl/lib/site_perl/5.6.1
/usr/local/foo/apps/perl/lib/site_perl .) at migration.pl line 9.
BEGIN failed--compilation aborted at migration.pl line 9.
====
Obviously, strict.pm is a pretty basic Perl module, so the script is
getting nowhere (/usr/local/foo doesn't actually exist)
This is a specialized version of Perl, which has apparently been
precompiled to include "/usr/local/foo/apps/perl" as its default root.
But I need to point it at /home/<blah> instead. The -I option appears
to do that, adding it to @INC when I run perl -V. But yet when I run
the actual script, the @INC no longer has the /home/<blah> path
included. What the heck?
No, I can't make a symlink from /usr/local/foo to /home/foo, though that
would solve the problem. (The reason for this is irrelevant to this
question, so I'll leave it out for brevity. The -I option *should*
work!)
Thanks for any ideas!
--Jeremy
--
/=====================================================================\
| Jeremy Portzer jeremyp at pobox.com trilug.org/~jeremy |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F E135 6F9F F7BC CC1A 7B92 |
\=====================================================================/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20030428/ff295213/attachment.pgp>
More information about the TriLUG
mailing list