perl 切换cpan

<pre name="code" class="html">linux 切换cpan:
(echo o conf urllist unshift http://mirrors.163.com/cpan/ http://mirrors.sohu.com/CPAN/  http://www.perl.com/CPAN/; echo o conf commit) | perl -MCPAN -e shell

windows:
C:UsersAdministrator>perl -MCPAN -e shell
Set up gcc environment - 3.4.5 (mingw-vista special r3)


cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.


cpan> (echo o conf urllist unshift http://mirrors.163.com/cpan/ http://mirrors.sohu.com/CPAN/  http://www.perl.com/CPAN/; echo o conf commit)
Unknown shell command '(echo'. Type ? for help.


cpan> echo o conf urllist unshift http://mirrors.163.com/cpan/ http://mirrors.sohu.com/CPAN/  http://www.perl.com/CPAN/; echo o conf commit
Unknown shell command 'echo'. Type ? for help.


cpan> o conf urllist unshift http://mirrors.163.com/cpan/ http://mirrors.sohu.com/CPAN/  http://www.perl.com/CPAN/;
Please use 'o conf commit' to make the config permanent!




cpan> o conf commit
Your C:Perllib/CPAN/Config.pm file
is not writable. I will attempt to write your configuration to
C:UsersAdministratorAppDataLocal.cpanCPANMyConfig.pm instead.


commit: wrote 'C:UsersAdministratorAppDataLocal.cpanCPANMyConfig.pm'



                                    
原文地址:https://www.cnblogs.com/hzcya1995/p/13351444.html