简体   繁体   English

使用Perl下载CPAN模块

[英]Download CPAN modules using perl

I want to download all the CPAN modules using perl script. 我想使用perl脚本下载所有CPAN模块。 I Googled it. 我用谷歌搜索。 I found many of them suggested WWW::Mechanize module. 我发现其中许多建议使用WWW :: Mechanize模块。 Can any one give me clear idea how to start this? 谁能给我清楚的主意如何开始这个工作? I tried the below code 我尝试了以下代码

use WWW::Mechanize;

my $url = 'marinetraffic2.aegean.gr/ais/getkml.aspx';
my $local_file_name = 'getkml.aspx';

my $mech = WWW::Mechanize->new;

$mech->get( $url, ":content_file" => $local_file_name );

but i couldn't get the possible output. 但我无法获得可能的输出。 Please help me out 请帮帮我

Rsync CPAN. Rsync CPAN。 How to mirror CPAN . 如何镜像CPAN

If you just want the current modules, check out CPAN::Mini . 如果只需要当前模块,请查看CPAN :: Mini

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM