What am I doing wrong? A bad end-user experience
"Paul \"LeoNerd\" Evans" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
I keep a bunch of perl modules in my $HOME: $ env | grep PERL PERL5LIB=/home/leo/lib/perl5 PERL_MB_OPT=--install_base=/home/leo PERL_MM_OPT=INSTALL_BASE=/home/leo I use system perl. Today, I ran some debian updates that jumped from perl 5.40 to 5.42. Now, nothing is usable: $ eachperl list Perl API version v5.40.0 of Object::Pad does not match v5.42.0 at /usr/lib/x86_64-linux-gnu/perl-base/DynaLoader.pm line 218. ... OK, fair enough. I guess I need to rebuild Object::Pad: $ cd Object-Pad $ perl Build.PL Attempt to reload Scalar/Util.pm aborted. Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl-base/File/Temp.pm line 153. ... Oops. Turns out the Scalar::Util that I have in $HOME/lib/perl5 is wrong. No matter, I can just update and install that, right..? $ cpan Scalar::Util Attempt to reload Scalar/Util.pm aborted. Compilation failed in require at /usr/share/perl/5.42/Safe.pm line 4. Uhhm. OK.. How do I get out of this one? That isn't *actually* a question to folks here, I in fact do know how to solve this. It's "simple": $ xargs rm <lib/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/.packlist and now we're back to the system distributed one. From here I can backtrack and rebuild things from source. Of course, I can't just use `cpan` to install things because CPAN.pm simply notes that the required .pm files are in place and doesn't want to install: $ cpan Object::Pad ... Object::Pad is up to date (0.825). $ perl -MObject::Pad -e1 Perl API version v5.40.0 of Object::Pad does not match v5.42.0 at /usr/lib/x86_64-linux-gnu/perl-base/DynaLoader.pm line 218. so now I have to guess around some way to force reinstall this, and all of its dependencies. One at a time. By hand. Because CPAN.pm won't help me. This exact problem of "argh all my perl is broken" is going to happen to anyone doing this kind of setup, whenever system perl gets updated. So someone, please tell me, what am I doing wrong here? I cannot believe that this is the intended behaviour of the system we have. Alternatively, maybe this is as good as can currently be achieved. If so then I really don't like it, and I think we could do a lot better. <rant> If users can't easily install newer versions of perl and have things actually still usable, then I can quite well understand why people don't update to newer versions, and so keep using ancient versions and not bother making use of new features so nobody uses anything new that we make and so why do we spend time making anything new? </rant> -- Paul "LeoNerd" Evans [email protected] http://www.leonerd.org.uk/ | https://metacpan.org/author/PEVANS