Changing CPAN mirrors

From brokenpoet.org wiki

You may run into an issue where CPAN cannot find or connect to it's mirrors.

A list of mirrors is available from http://www.perl.com/CPAN/SITES.html

So grab a few and then go into cpan by issuing

cpan

Once you are in cpan you will see the prompt

cpan>

Run the following to get a list of the current mirrors:

o conf urllist

Then you can add a new entry by keying in

o conf urllist push http://ftp.wayne.edu/cpan/

or whatever mirror you are adding. Then you MUST run

o conf commit


Other commands of interest are:

o conf urllist shift                     which takes the top entry off the list

and

o conf urllist pop                       which pops the bottom entry off the list


Those of you with programming backgrounds will recognize the pop/shift/push concepts.

The flat file where the mirrors and CPAN config are present should be located here:

/usr/lib/perl5/5.8.8/CPAN/Config.pm
Personal tools