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

I am trying to download a module and it seems that all the mirror sites are not working.

Also I am getting this message in CPAN:
There's a new CPAN.pm version (v1.9102) available! [Current version is v1.87] You might want to try install CPAN reload cpan without quitting the current session. It should be a seamless upgrad +e while we are running...
I will admit I am a little scared to do this since I "think" I did it once and it broke all my scripts that used downloaded modules and I had to reload them all.

So if I start CPAN and type:
install CPAN reload CPAN
1. Will it allow me to choose new download mirrors?
2. Will it mess up my downloaded modules and require me to re-install/download them?

Replies are listed 'Best First'.
Re: Upgrading CPAN
by mmmmtmmmm (Monk) on Sep 10, 2007 at 04:57 UTC
    I've had problems with this as well recently, and from what I've read, it is not a good idea to upgrade CPAN.pm with CPAN, and instead is a better idea to download the sources and upgrade manually. I don't know if this is true, but I managed to fix it by re-emerging Perl on my Gentoo installation, and didn't bother trying to upgrade it after that, so YMMV.

    ---mmmmtmmmm

    Update:

    And by the way, here's a link to the sources:
    CPAN.pm
      and from what I've read, it is not a good idea to upgrade CPAN.pm with CPAN
      i haven't read something like that. do you have a link?
      it has always been working for me.
        Configuring CPAN

        Here is the article where I read that -- I don't know if it still applies (the article is talking about an older version of CPAN && Perl). I personally had problems installing Bundle::Cpan with CPAN, but perhaps this was due to my own ignorance of how to use it properly -- I just took the lazy route to fix it and did "emerge perl", which fixed cpan for me. Perhaps someone more knowledgable could say whether this article is outdated/untrue/etc...

        ----mmmmtmmmm
Re: Upgrading CPAN
by rogueFalcon (Beadle) on Sep 10, 2007 at 22:40 UTC
    I have updated CPAN that way and it has always worked for me... I only use (perl -MCPAN -e shell) if I am doing a new Linux install. If I were you and it messed up before I would just read everything it says as it installs. Don't just keep hitting enter and accepting the defaults for everything. I normally install cpan modules directly from the source. It's very easy.

    save the source
    wget http://mirror/path.to.source/CPANsource.tar.gz
    # tar zxvf CPANsource.tar.gz
    # cd CPANsource
    # make
    (Get mad if I don't have the dependencies and wish I was using the cpan script ;-)
    # make test
    (Get mad if it doesn't pass the tests)
    # make install
    Note: you have to be root prior to make install.

    -- rogueFalcon
    Why do you people insist on doing things sdrawkcab?

Re: Upgrading CPAN
by davehorner (Scribe) on Apr 25, 2017 at 15:17 UTC
    In the latest strawberry perl 5.24.1, cpanm --self-upgrade does not work. Using cpanm App::cpanminus does work, providing a work around.
    C:\WINDOWS\system32>cpanm --self-upgrade Can't find Unicode property definition "e" in regex; marked by <-- HER +E in m/^C: \STRAWB~1\pe <-- HERE rl\site\bin/ at C:\Strawberry\perl\bin/cpanm lin +e 33.

    You will need to also delete the cpanm and cpanm.bat from C:\Strawberry\perl\bin, if your system is setup properly cpanm will use site\bin.

    Anyways, here's hoping this helps someone else.
    --dave
Re: Upgrading CPAN
by DrHyde (Prior) on Sep 11, 2007 at 09:47 UTC

    You're probably thinking of the problem with some *very* old versions of CPAN.pm where it would, under some circumstances, try to upgrade your version of perl, and that can really bugger things up. However, version 1.87 is fine. I've done exactly that upgrade several times on various builds of perl, and it worked just fine. IIRC the problem was with the version of CPAN.pm distributed with perl 5.005, and was fixed in perl 5.6.0.

    When you upgrade it'll use as much of your old configuration as possible, and ask you to configure any new options the first time it tries to use 'em. To change them, type 'o conf urllist ...' at the CPAN shell or (and I find this more convenient) edit CPAN/Config.pm by hand.