Reconfiguring CPAN from scratch

Sometimes I’ll be on an old box and need to install a CPAN perl module for something.  But when starting up CPAN, it tries to hit a bunch of mirrors that no longer exist.  I just found out that you can easily clear the CPAN configuration and  have it re-ask you all of the inital configuration questions.   Simply use the command ‘o conf init’ at the cpan> prompt.

I usually install Bundle::CPAN first so that you get a bunch of the important stuff, then install whatever else you need.

Leave a Reply

Your email address will not be published. Required fields are marked *