天天看点

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

<b>查看已安装PERL的模块</b>

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-&gt;new();

   print join "\n", $inst-&gt;modules();

4、Most of them will probably already be available in your installation. You can   check version numbers with the <code>configure</code> script, or if you're still trying to get to that point, check from the command line like this:

继续阅读