perl配置perl依赖库⽂件安装源
cpan
查看镜像列表:
cpan[1]>o conf urllist
urllist
0 [httpupdate3.cpanel/CPAN/]
1 [httpupdate23.cpanel/CPAN/]
2 [mirrors.servercentral/CPAN/]
3 [ftp://cpan.cse.msu.edu/]
增加列表
cpan[2]> o conf urllist push mirror.waia.asn.au/pub/cpan/
Remove a CPAN mirror
To remove a CPAN mirror use the “shift” or “pop” functions to remove the mirror URL from the front or end of the mirror list:王小利为什么不演刘能了
cpan[3]> o conf urllist pop
Completely replace the existing mirror list
你知不知道思念一个人的滋味是什么歌To overwrite the existing mirror list with a new one, just provide the URLs to the new mirrors as a space separated list:
cpan[4]> o conf urllist mirror.waia.asn.au/pub/cpan/ ftp://pvgg.ar/CPAN/
Saving changes
Once you have updated the CPAN mirror list, make sure you commit the changes to file so they are saved beyond the current session:
cpan[5]> o conf commit赵文卓和甄子丹事件是怎么回事
commit: wrote '/home/sillymoose/.cpan/CPAN/MyConfig.pm'callmyname
Edit the CPAN configuration file directly
赵文琪个人资料You can also edit the CPAN config file directly. For local user Perl installations this is */CPAN/MyConfig.pm and system Perl installations */CPAN/Config.pm (the parent directory will depend on the platform). When editing the file, urllist is a hash key for an array reference of mirror urls. Note the urls are quoted using Perl’s quoting operator (“q”). Simply edit and save the file.
'urllist' => [
q[httpupdate3.cpanel/CPAN/],
q[httpupdate23.cpanel/CPAN/],
q[mirrors.servercentral/CPAN/],
q[ftp://cpan.cse.msu.edu/]
],
重新配置,如要重新配置CPAN,可先进⼊CPAN
# perl -MCPAN -e shell
CPAN> o conf init  //在CPAN命令⾏输⼊,然后在下⾯的各个询问中修改各选项CPAN> reload index  //修改完后通过reload index, reload cpan来更新CPAN> reload cpan
真爱麻烦主题曲
⼏个主要的CPAN站点有: 
    国内:
⼆.原因也可能默认缓存/root/.cpan中的数据损坏
rm -rf ~/.cpan
删除后在perl -MCPAN -e shell中执⾏reload index
然后执⾏install Bundle::CPAN
最后执⾏reload CPAN即可正常通过命令⾏install MODULES