Subject: | @INC seems to be reversed (perl vs. arch) |
It seems like the arch-specific directory should come before the pure-
perl directory. For instance, I had Moose-0.93 installed (which went in
lib/perl5/Moose.pm). I tried to upgrade to version 1.03 (which was
installed in lib/perl5/i686-linux) but when loading Moose under
local::lib, it finds the lib/perl5/Moose.pm version first (instead of
the new version). Perhaps this is an issue with how Moose is packaged
but it seems that local::lib should prefer the architecture specific
path before the pure perl path.
Oddly, this only happens when invoking local::lib as part of a -M switch
on the command line. If you set the environment variables, it seems to
work OK (the arch-specific directory gets prepended on @INC by
something, I'm not sure what).
Here's how to reproduce the issue:
1. install Moose 0.93 in a local::lib directory
2. execute:
% perl -Mlocal::lib -MMoose -le 'print Moose->VERSION'
output: 0.93
3. install Moose 1.03 in the same local::lib directory
4. execute:
% perl -Mlocal::lib -MMoose -le 'print Moose->VERSION'
output: 0.93
5. execute:
% eval $(perl -Mlocal::lib); perl -Mlocal::lib -MMoose -le 'print Moose-
Show quoted text
>VERSION'
output: 1.03
I attempted to contact someone on #local-lib (on irc.perl.org) to
discuss this but no one seemed to be around so I just decided to file
the bug.