[clug] Perl @INC and finding modules weirdness
Hal Ashburner
hal.ashburner at gmail.com
Thu Mar 4 07:09:27 MST 2010
I have perl error that is taking the mickey out of me.
Can't locate Foo/Bar/Baz.pm in @INC (@INC contains: /usr/bin/..
/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.10.0
/usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0
/usr/lib/perl5/site_perl . ) at /usr/lib/perl5/site_perl/foo_bar.pl line 3.
Foo/Bar/Baz.pm is right there in /usr/lib/perl5/site_perl/
It's being called by something.pl also in /usr/lib/perl5/site_perl, it
calls it in an orthodox fashion, ie:
use Foo::Bar::Baz;
Confusing, so I thought I'd kick off the script with
push @INC, /usr/lib/perl5/site_perl/Foo/Bar/Baz.pm;
Just to poke cruel fun at the perl message because I'm nothing if not
petty when it comes to inanimate objects being disobedient. It's not
comforting me as much as I'd hoped.
Can't locate Foo/Bar/Baz.pm in @INC (@INC contains: /usr/bin/..
/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.10.0
/usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0
/usr/lib/perl5/site_perl . /usr/lib/perl5/site_perl/Foo/Bar/Baz.pm) at
/usr/lib/perl5/site_perl/foo_bar.pl line 3.
Any clues as to why it can't locate a file in @INC then when it tells me
the content of @INC explicitly lists the file?
Permissions look ok to me but could that be it? I think I'm comfortable
in calling the error message "misleadling".
This is fedora core 11 with SELinux switched off in case that's somehow
important. The code runs happily enough on debian stable.
Cheers,
Hal
More information about the linux
mailing list