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!

13 comments
  1. 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.

  2. 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.

  3. Pingback: Puddles MythTV

Comments are closed.

You May Also Like

What a Resilver Looks Like in ZFS (and a Bug and/or Feature)

At home I have an (admittedly small) ZFS array set up to experiment with this neat newish raid technology. I think it has been around long enough that it can be used in production, but I’m still getting used to the little bugs/features, and here is one that I just found. After figuring out that I had 2 out of 3 of my 1TB Seagate Barracuda hard drives fail, I had to give the array up for a loss and test out my backup strategy. Fortunately it worked and there was no data loss. After receiving the replacement drives in from RMA, I rebuilt the ZFS array (using raidz again) and went along my merry way. After 6 months or so, I started getting some funky results from my other drive. Thinking it might have some issue as with the others, I removed the drive and ran Seatools on it (by the way, Seatools doesn’t offer a 64-bit Windows version – what year is this?). The drive didn’t show any signs of failure, so I decided to wipe it and add it back into the array to see what happens. That, of course, is easier said than done.

A Poor Man’s VPN: Proxy Web Connection to Remote Server (via SSH and Tunnel)

Did you ever have a situation where you needed to access a…

Analysis of a hacked machine

If you are a system administrator, you should dread any time you…

Dead linux users?

Not dead as in dead, but dead as in the user has logged out of the system and for some reason their shell is still open. This might happen if your system crashes before you can log out, there are network problems and you are disconnected, or a number of other reasons. This article explains how to log these “dead” shell users out.