cpan配置

# perl -MCPAN -e shell
cpan> o conf urllist unshift  http://www.perl.com/CPAN/
cpan> o conf commit
在search.cpan.org也看到有两个中国的镜像,考虑到稳定性,还是使用perl.com的
还有一点是在用cpan的时候,因为模块安装时默认的make  test不成功,make install就不会去做,但是因为某些情况并不需要这样,这时候,可以force install DBD::mysql
============================================================
配置http_proxy的方法:
o conf http_proxy http://proxy:8080
============================================================
有时候,可能几个不重要的make test中的测试项导致make test失败,这时候就用强制安装:
force install Test::WWW::Mechanize::Catalyst
查看已安装PERL的模块
1、perldoc perllocal
 
2、推荐pmtools里的pminst命令 
   http://search.cpan.org/src/MLFISHER/pmtools-1.01/pminst
 
3、编写如下标本
   #!/usr/bin/perl
   use ExtUtils::Installed;
   my $inst = ExtUtils::Installed->new();
   print join "\n", $inst->modules();
 
4、Most of them will probably already be available in your installation. You can   check version numbers with the configure script, or if you're still trying to get to that point, check from the command line like this:
     perl -e 'use FileHandle; print $FileHandle::VERSION."\n"'
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章