p5pclub / ref-util

Ref::Util - Utility functions for checking references
6 stars 11 forks source link

Split into Ref::Util and Ref::Util::XS leaves old files installed #41

Open tobyink opened 7 years ago

tobyink commented 7 years ago

This is probably not an issue that you can do anything about, but it should be noted somewhere.

I installed Ref::Util 0.203, upgrading from 0.113 via cpanm on perlbrew. However, running a script which included use Ref::Util 0.200 kept failing, insisting that I had Ref::Util 0.113 installed.

The problem was that I had ended up with two copies:

~/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/Ref/Util.pm  # 0.203
~/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/x86_64-linux/Ref/Util.pm  # 0.113

Using cpanm -U to uninstall Ref::Util, Ref::Util::PP, and Ref::Util::XS and then reinstall them fixed the issue.

karenetheridge commented 7 years ago

this should be fixable. I'll have a closer look when I'm more awake.

arc commented 7 years ago

I suspect I screwed up the "uninstall older versions" logic when I swiped it from Devel::GlobalDestruction, tbh, so fingers crossed it'll be easy enough to fix up my mistake

xsawyerx commented 6 years ago

Could you please verify if this still happens? We made various fixes to Ref::Util::XS.

xsawyerx commented 6 years ago

Sorry, accidentally closed.

neilb commented 6 years ago

This still seems to be a problem. I've just tried making a dist dependent on Ref::Util 0.202, but when I run cpan Ref::Util locally, it all appears to work, but then I still get:

% perl Makefile.PL
Warning: prerequisite Ref::Util 0.202 not found. We have 0.020.

If only there were a chance for the relevant parties to resolve this sometime soon ...

As per Toby's comment, uninstalling with cpanm -U and then re-installing sorted it.

arc commented 6 years ago

@neilb Is the older version installed into a library directory belonging to your Perl, or into a local::lib dir or similar?

neilb commented 6 years ago

@arc, it was wherever "cpan Ref::Util" will have put it, so yes, in Perl's arch-specific library directory (just confirmed on another machine where I have the same version installed).

Since I cpanm -U'd it, I can't tell you definitively, but hopefully the above is enough for you anyway?

karenetheridge commented 6 years ago

presently we are deleting from DESTINSTALLSITEARCH; we could add to that the other 3 install dirs just to be sure:

karenetheridge commented 6 years ago

@haarg++

We should s/footer_file/header_file/ in dist.ini.

miyagawa commented 6 years ago

i think cpanm --uninst-shadows would also resolve it, fwiw.

arc commented 6 years ago

@neilb I've just released 0.204 which we hope fixes this, thanks to @karenetheridge++ — if you could test in your situation, that would be great!