Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Changing Location of Mirror for CPAN Shell

by neversaint (Deacon)
on May 23, 2006 at 15:35 UTC ( #551175=perlquestion: print w/replies, xml ) Need Help??

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

Dear Masters,

Is there a way to change the order of the location (or adding )
of the current CPAN mirror as repository for modules installation via CPAN Shell?
Is it possible to do this within CPAN shell itself?

Update: List of locations can be found here and also tips by brian_d_foy.
Thanks to atcroft for this pointer.

---
neversaint and everlastingly indebted.......
  • Comment on Changing Location of Mirror for CPAN Shell

Replies are listed 'Best First'.
Re: Changing Location of Mirror for CPAN Shell
by atcroft (Abbot) on May 23, 2006 at 15:46 UTC

    According to the Configuration section of the documentation for the CPAN module, you can either push or shift a value into the list using the following syntax:

    • o conf urllist push scheme://path/to/mirror (add to the end of the url list)
    • o conf urllist shift scheme://path/to/mirror (add to the beginning of the url list)
    So if you know a particular repository that is faster, you can change it for the session. You can also create your own local configuration, as answered in question 5 of the FAQ section of the same documentation, and have it use the URLs of the mirrors you prefer as well, thus making your changes permanent.

    HTH....

Re: Changing Location of Mirror for CPAN Shell
by marto (Archbishop) on May 23, 2006 at 15:39 UTC
Re: Changing Location of Mirror for CPAN Shell
by gellyfish (Monsignor) on May 23, 2006 at 15:40 UTC

    I think you are looking for the CPAN shell command o conf urllist which takes a list of the mirrors you want to use.

    /J\

Re: Changing Location of Mirror for CPAN Shell
by philcrow (Priest) on May 23, 2006 at 15:38 UTC
    I don't know how to do it from within the CPAN shell, but you can edit the Config file. Mine is in

    /usr/lib/perl5/5.8.3/CPAN/Config.pm

    Look for the urllist key and edit carefully.

    Phil

Re: Changing Location of Mirror for CPAN Shell
by Fletch (Chancellor) on May 23, 2006 at 15:40 UTC

    You have to know the URL, but see the section "Configuration" in the docs for CPAN (specifically the urllist key therein).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://551175]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2019-10-17 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?