CPAN
view release on metacpan or search on metacpan
lib/CPAN.pm view on Meta::CPAN
}
}
},
],
LWP => [ # we frequently had "Can't locate object
# method "new" via package "LWP::UserAgent" at
# (eval 69) line 2006
sub {require LWP},
sub {require LWP::UserAgent},
sub {require HTTP::Request},
sub {require URI::URL;
unless (CPAN::Version->vge(URI::URL::->VERSION,0.08)) {
for ("Will not use URI::URL, need 0.08\n") {
$CPAN::Frontend->mywarn($_);
die $_;
}
}
},
],
'Net::FTP' => [
lib/CPAN/Distribution.pm view on Meta::CPAN
$CPAN::Frontend->mywarn("ERROR: CPAN::LWP::UserAgent->new dies with $@\n");
return;
} else {
my($var);
$Ua->proxy('http', $var)
if $var = $CPAN::Config->{http_proxy} || $ENV{http_proxy};
$Ua->no_proxy($var)
if $var = $CPAN::Config->{no_proxy} || $ENV{no_proxy};
}
my $req = HTTP::Request->new(GET => $url);
$req->header('Accept' => 'text/html');
my $res = $Ua->request($req);
if ($res->is_success) {
$CPAN::Frontend->myprint(" + request successful.\n")
if $CPAN::DEBUG;
print $fh $res->content;
close $fh;
$CPAN::Frontend->myprint(qq{ + saved content to $tmpin \n})
if $CPAN::DEBUG;
return $tmpin;
( run in 0.409 second using v1.01-cache-2.11-cpan-de7293f3b23 )