Acme-emcA
view release on metacpan or search on metacpan
* This release is identical the '0.10' release in October 14, 2007
with the changes listed below, except it fixes the double-indexing
caused two '0.10' releases.
* LICENSING CHANGE: This compilation and all individual files in it
are now under the permissive "MIT" license.
* Corrected diagnostics to match the documentation.
* Tidied up source code, test files, and this changelog.
[Changes for 0.10 - December 12, 2005]
* Gaal Yahas reported a typo error in the module's POD that
incorrectly mentioned Acme::ComeFrom.
* Modernise build system again.
[Changes for 0.03 - November 8, 2003]
inc/Module/Install/Fetch.pm view on Meta::CPAN
require Cwd;
my $dir = Cwd::getcwd();
chdir $args{local_dir} or return if exists $args{local_dir};
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
} }
elsif (my $ftp = $self->can_run('ftp')) { eval {
# no Net::FTP, fallback to ftp.exe
require FileHandle;
my $fh = FileHandle->new;
local $SIG{CHLD} = 'IGNORE';
unless ($fh->open("|$ftp -n")) {
warn "Couldn't open ftp: $!\n";
chdir $dir; return;
}
my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
END_FTP
foreach (@dialog) { $fh->print("$_\n") }
$fh->close;
} }
else {
warn "No working 'ftp' program available!\n";
chdir $dir; return;
}
unless (-f $file) {
warn "Fetching failed: $@\n";
chdir $dir; return;
( run in 0.498 second using v1.01-cache-2.11-cpan-49f99fa48dc )