Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

CPAN Catch-22

by snax (Hermit)
on Sep 25, 2017 at 20:37 UTC ( [id://1200071]=perlquestion: print w/replies, xml ) Need Help??

snax has asked for the wisdom of the Perl Monks concerning the following question:

So I've managed to shoot myself in the foot. Earlier today I did an update of my CPAN module, via a perl -MCPAN -e shell session. This was kind of a reflex because I hadn't used CPAN for a while. That turned out OK (upgraded to v2.14 of CPAN), but ever since, any time I use perl -MCPAN -e shell and try to install or update anything, I get an annoying error:

Will not use CPAN::Meta::Requirements, need version 2.120920

Naturally that requirement is a literal specification in the v2.14 CPAN.pm module code. It's not "need >=". I have v2.125 of CPAN::Meta::Requirements.

Any clues on how best to sort this out? I grabbed source for CPAN v 2.16 but building that shows I need to upgrade other things, and I want to be able to rely on the CPAN module for managing packages. It's great when it works right :)

Replies are listed 'Best First'.
Re: CPAN Catch-22
by choroba (Cardinal) on Sep 25, 2017 at 20:59 UTC
    CPAN 2.14 uses the following to compare CPAN::Meta::Requirements version:
    'CPAN::Meta::Requirements' => [ sub { require CPAN::Meta::Requirements; unless (CPAN::Version->vge(CPAN::Meta: +:Requirements->VERSION, 2.120920)) { for ("Will not use CPAN::Meta::Req +uirements, need version 2.120920\n") { $CPAN::Frontend->mywarn($_); die $_; } } }, ],

    where vge is defined as follows in CPAN::Version :

    sub vge { my($self,$l,$r) = @_; $self->vcmp($l,$r) >= 0; }

    So it seems it's "need >=". Are you sure about the version numbers?

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

      Thanks for pounding my head with that. Somehow I managed to get CPAN::Meta::Requirements installed in my local library at version 2.125, but it's in my main installation at 2.120351.

      [root@cruncher CPAN-2.14-1ngyVR]# locate CPAN | grep Requirements.pm /root/.cpan/build/CPAN-Meta-Requirements-2.125-0Qpk5a/blib/lib/CPAN/Me +ta/Requirements.pm /root/.cpan/build/CPAN-Meta-Requirements-2.125-0Qpk5a/lib/CPAN/Meta/Re +quirements.pm /root/perl5/lib/perl5/CPAN/Meta/Requirements.pm /usr/local/share/perl5/CPAN/Meta/Requirements.pm

      This is a problem I can sort out :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1200071]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2024-04-18 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found