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"'
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章