Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

How to reset cpan to default values

by xorl (Deacon)
on Jun 10, 2012 at 14:41 UTC ( [id://975452]=perlquestion: print w/replies, xml ) Need Help??

xorl has asked for the wisdom of the Perl Monks concerning the following question:

So I configured cpan to use an internal company mirror. However now I want to reset it back to default values. (and no I don't remember how I got this whacked configuration, except I did it all from the cpan shell)

I tried first:

o conf init urllist

However it looks to the internal company mirror for the MIRROR.BY list. That of course only lists the inside and it never gives me the option of choosing North America or anything after that.

Then I decided to try to reset everything with

o conf init

However when it gets to doing stuff related to the Internet it again only looks to our internal server.

Short of removing and reinstalling cpan is there some way to reset it to the originial default values?

Thanks in advance.

Replies are listed 'Best First'.
Re: How to reset cpan to default values
by stevieb (Canon) on Jun 10, 2012 at 17:07 UTC

    I just did a test (on Ubuntu 11.10). I went into /etc/perl/CPAN directory, moved Config.pm to Config.pm.orig, then re-ran perl -MCPAN -e shell and it offered me the ability to redo the original setup.

    Hope this helps.

Re: How to reset cpan to default values
by ansh batra (Friar) on Jun 10, 2012 at 20:10 UTC

    you can delete /etc/perl/CPAN/Config.pm and then try perl -MCPAN -e shell

      Thanks this almost worked. It got me on track of trying to figure out where cpan kept its config stuff.

      There was something in $HOME/.cpan/CPAN/MyConfig.pm that was setting the urllist and making it impossible to download the MIRRORED.BY file from a real cpan mirror. I removed it and magic happened.

        one more thing.take the backup of config.pm and if you want to do some minor changes in Ur CPAN configuration then simply edit config.pm which is easier than typing commands on Ur CPAN shell.
        eg if u want to add some URL then it is much easier and faster to edit the file

Re: How to reset cpan to default values
by DrHyde (Prior) on Jun 13, 2012 at 10:53 UTC
    $ perl -MCPAN -e shell ... cpan[1]> o conf urllist http://moonbeast.wibble.poing
    will set it to whatever you like. If you want to point it at the default set of mirrors, use http://www.cpan.org, which will pick a nearby mirror for you automagically.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://975452]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-03-29 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found