Closed rlauer6 closed 1 year ago
Pod::Parser 1.61 is in vendorlib /usr/share/perl5/vendor_perl
.
cpanm installs Pod::Parser 1.65 into perllib/corelib /usr/share/perl5
because Pod::Parser 1.65 itself specifies INSTALLDIRS is perl
;
see https://metacpan.org/release/MAREKR/Pod-Parser-1.65/source/Makefile.PL#L73
This is an issue for Pod::Parser 1.65, not for cpanm.
Thank you...
If I specifically tell cpanm
to install to /usr/local
(siteprefix) which if I understand @INC
order, I should not be seeing an older version of Pod::Parser
?
Built under linux
Compiled at Feb 17 2021 20:26:47
@INC:
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5
/usr/share/perl5
.
bash-4.2# cpanm -v -l /usr/local Pod::Parser
cpanm (App::cpanminus) 1.7046 on perl 5.016003 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1676905193.6795
You have make /usr/bin/make
You have LWP 6.67
Falling back to Archive::Tar 1.92
Searching Pod::Parser () on cpanmetadb ...
Pod::Parser is up to date. (1.65)
bash-4.2# perl -MPod::Parser -e 'print $Pod::Parser::VERSION;'
1.61bash-4.2#
It would be easier to patch Makefile.PL by yourself.
❯ wget https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Parser-1.65.tar.gz
❯ tar xf Pod-Parser-1.65.tar.gz
❯ cd Pod-Parser-1.65
# comment out INSTALLDIRS stuff
❯ perl -i -pe 's/^\s*INSTALLDIRS/# INSTALLDIRS/' Makefile.PL
❯ perl Makefile.PL
❯ make
❯ make install
❯ ls -al /usr/local/share/perl5/Pod/Parser.pm
❯ perl -MPod::Parser\ 99999999
Pod::Parser version 99999999 required--this is only version 1.65.
BEGIN failed--compilation aborted.
Thanks again...and I'm not even sure why I want to upgrade this module 1.61 seems to work fine - however is it true that this:
INSTALLDIRS => ($] >= 5.006 ? 'perl' : 'site'),
so is the bug that this statement should have been:
INSTALLDIRS => ($] >= 5.006 ? 'perl' : 'site'),
Oddly the original statement seems to read "install this in perl because starting 5.06 the module is in core". if the original statement is correct wouldn't that imply you couldn't upgrade any module that is in core? Looking at something like
List::Util
I see:INSTALLDIRS => ($] < 5.011 ? q[perl] : q[site]),'
which also now part of core...but allows upgrade
perl 5.12 changed the order of @INC
so that core modules can be upgraded in site
while retaining the original version in perl
. The code in List::Util is the correct one for the current core modules. Pod::Parser isn't even a core module anymore in perl 5.32 or later, and I don't understand why they keep the line there.
Thank you again! Now it makes sense why List::Util
installs to site now...so I would consider Pod::Parser
installation order a bug
Trying to install a new version of a module appears to succeed, however the module version remains the same.