Warning: Invalid argument supplied for foreach() in /home/sysbash/domains/systembash.com/public_html/wp-content/plugins/topsy/topsy.php on line 1199
Change your default CPAN mirror – systemBash

Change your default CPAN mirror

Changing your cpan mirror.

Although it seems like it would be easy task to accomplish, it seems there is no easy way to change the perl CPAN module mirror list. I have only found two ways to do this.

The first way I found is to modify your Config.pm in the CPAN module. In my install, it is located at /usr/lib/perl5/5.8.5/CPAN/Config.pm. Look for ‘urllist’ and you will see the list of mirrors. Modify this variable to change where CPAN looks for its modules.

The second way is to re-run the CPAN configuration. You do this by running the cpan command line:
perl -MCPAN -e shell

and then running o conf init

cpan> o conf init

This will run the initial configuration of CPAN again.

It seems like there should be an easier way to do this – if anyone knows please post a comment!

Technorati Tags: , ,
Share and Enjoy:
  • Twitter
  • del.icio.us
  • Digg
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Print
  • StumbleUpon

2 Trackbacks

  1. By tsuno.be » CPAN Mirror on April 21, 2007 at 11:41 am

    [...] 参考記事 :: Change your default CPAN mirror . systemBash [...]

  2. By Puddles MythTV on July 9, 2009 at 10:35 pm

    and http://is.gd/1sIgH for helping me set CPAN to a quota free mirror. (And to http://iinet.net for updating their CPAN mirror this morn)

5 Comments

  1. Dustin

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

    Other commands

    o conf urllist shift
    o conf urllist pop

    Posted November 9, 2006 at 1:02 pm | Permalink
  2. james

    the problem with the second option is that if you’re changing your CPAN mirror because the old one isn’t working, it won’t succeed in getting the list of mirrors since it tries to get them from your current mirror.

    Posted November 17, 2006 at 1:42 pm | Permalink
  3. Minor correction to # 01 above:

    o conf urllist commit

    SHOULD BE

    o conf commit

    Posted February 28, 2007 at 3:07 pm | Permalink
  4. zaki

    thanks it worked for me.

    Posted March 15, 2007 at 8:14 am | Permalink
  5. Apoorv Sharma

    Thanks a lot!

    saved a life… :)

    Posted October 23, 2008 at 4:41 am | Permalink