in reply to Re^2: Problem Starting CPAN Shell with ftp.perl.org
in thread Problem Starting CPAN Shell with ftp.perl.org

How do you do that?
By adding HTTP URLs in the URL-list. The main tool to manage that list is "o conf" in the CPAN shell.

You can see the current contents (under "urllist") with just "o conf", or, more limited in output, with "o conf urllist".

You can replace the whole URL-list with, for example (this is the contents I have, which must have been put there by default):

o conf urllist http://ppm.activestate.com/CPAN http://cpan.perl.org

You can also add a URL to the existing list with shift and push, like this:

o conf urllist push http://cpan.perl.org o conf urllist unshift http://cpan.perl.org
or drop the first or last entry resp. with
o conf urllist shift o conf urllist pop

You must save the changes with

o conf commit
or you can rollback (after a disastrous mistake) with
o conf defaults

HTH.

Replies are listed 'Best First'.
Re^4: Problem Starting CPAN Shell with ftp.perl.org
by Anonymous Monk on Mar 25, 2009 at 15:59 UTC
    Thank you very much for step by step instructions. I am a perl / Linux newbie and was trying to get some perl modules installed for past 2 days. Even though my firewall was allowing ftp, somehow I couldn't download the required modules using ftp. As soon as i added https to my cpan config file, things worked flawlessly. Thanks again
Re^4: Problem Starting CPAN Shell with ftp.perl.org
by Anonymous Monk on Nov 06, 2009 at 21:34 UTC
    Um. . .if you could get to a CPAN shell without going through this we wouldn't be having this conversation, right?
Re^4: Problem Starting CPAN Shell with ftp.perl.org
by Anonymous Monk on May 13, 2010 at 06:39 UTC

    after much frustration, the following worked for me:

    1. cpan <-- answer "no" to initial setup.
      This allows (auto configured) Config.pm file (see below) to be initialised. Previously I think this file had "1;" or something helpful in it!
    2. I then added:
      'dontload_hash' => {"Net::FTP" => 1, "LWP" =>1 }, # disable Net::FTP + and LWP which usually hang to: /usr/lib/perl5/5.8.8/CPAN/Config.pm - see section: $CPAN::Config = { ...
      but this alone did not seem to do the job. I'm still not sure if this step had any effect.
    3. (in cpan shell)
      o conf urllist http://ppm.activestate.com/CPAN http://cpan.perl.org o conf commit quit

    worked for me - thanks!

    20100528 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips

Re^4: Problem Starting CPAN Shell with ftp.perl.org
by Anonymous Monk on Jul 17, 2012 at 14:59 UTC
    So I did ... # perl -MCPAN -e 'shell' And then ... cpan> o conf urllist http://ppm.activestate.com/CPAN http://cpan.perl.org cpan> exit Terminal does not support GetHistory. Lockfile removed. But when I do # cpan I still get ... Fetching with Net::FTP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Fetching with Net::FTP ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
      # perl -MCPAN -e 'shell'
      And then ...
      cpan> o conf urllist http://ppm.activestate.com/CPAN http://cpan.p +erl.org cpan> exit Terminal does not support GetHistory. Lockfile removed.

      You did not save your configuration. Before leaving the CPAN shell, you need the

      o conf commit

      command. Just like the posts instructed you.

        # perl -MCPAN -e 'shell'
        Tip for the technically less experienced people: the quotes are unnecessary on all platforms that I know off, so to avoid portability problems, it may be better to drop them:
        perl -MCPAN -e shell
        Still getting the following even after the o conf commit
        Fetching with Net::FTP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY