develooper Front page | perl.perl5.porters | Postings from August 2018

Re: [perl #133440] binaries mismatched again

Thread Previous | Thread Next
Dan Book
August 19, 2018 06:27
Re: [perl #133440] binaries mismatched again
Message ID:
On Sat, Aug 18, 2018 at 11:26 PM <> wrote:

> Thanks for your reply. While trying to downgrade my system (debugging
> another issue) I discovered a possible reason why I have problematic
> binary modules in my home directory which are also in Perl core
> (causing cpan to break when I upgrade Perl). The reason appears to be
> that the "recompile" cpan command reinstalls modules which I had
> removed earlier using 'cpanm'.
> $ PERL5LIB= cpanm -U Digest::SHA
> ...
> $ PERL5LIB= cpanm -U Time::HiRes
> ...
> $ perldoc -l Time::HiRes
> /usr/lib/perl5/5.28/core_perl/Time/
> $ perldoc -l Digest::SHA
> /usr/lib/perl5/5.28/core_perl/Digest/
> (after cpan recompile)
> $ perldoc -l Time::HiRes
> /home/frederik/.local/lib/perl5/x86_64-linux-thread-multi/Time/
> $ perldoc -l Digest::SHA
> /home/frederik/.local/lib/perl5/x86_64-linux-thread-multi/Digest/
> I don't know if this is a bug or just an annoyance, but it may go a
> little way towards solving the mystery of why I have these modules
> around, since I think I recall removing them earlier. Obviously, I
> don't look too carefully at the ouput of 'cpan -r', because I have
> better things to do, I just assume it's doing the "right thing". By
> the time I realize that I have duplicate modules installed, it's
> probably a year later and I don't remember having removed them.
> Also, I notice that if I ask 'cpanm' to install a module which is
> already in core, then it doesn't warn me:
> $ perldoc -l DB_File
> /usr/lib/perl5/5.28/core_perl/
> $ cpanm DB_File
> --> Working on DB_File
> Fetching
> ... OK
> Configuring DB_File-1.842 ... ^C
> I haven't checked what happens if I use cpanm to install a module
> which depends on modules in core, but if you give me an example of a
> CPAN module with dependencies in core then I can try this out.
> I couldn't figure out how to use the 'cpan' tool to remove modules,
> but 'cpanm' has a nice simple interface for doing that so I thought it
> would be compatible with 'cpan'.

 These are dual-life modules; it is expected and often desired to install
them a second time in site or vendor libs to upgrade them from the core
module version. Since Perl 5.12, site and vendor libs take precedence
in @INC for that reason. local::lib of course takes precedence over all
standard lib directories. cpanm's uninstall command relies on packlists,
and thus can only uninstall modules installed by a cpan client (whether
cpanm or cpan).


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About