Permalink
Browse files

mirror is LWP::Simple's method

  • Loading branch information...
1 parent 72e816a commit d4bd496d74f7f3422861ea872b5f3e6cef168d3e @semuel committed Jul 3, 2013
Showing with 1 addition and 10 deletions.
  1. +1 −10 lib/Dist/Surveyor/MakeCpan.pm
View
11 lib/Dist/Surveyor/MakeCpan.pm
@@ -6,7 +6,7 @@ use Data::Dumper; # core
use File::Path; # core
use CPAN::DistnameInfo;
use File::Basename qw{dirname}; # core
-use LWP::Simple qw{is_error};
+use LWP::Simple qw{is_error mirror};
use LWP::UserAgent;
use Dist::Surveyor::Inquiry;
use List::Util qw(max); # core
@@ -202,15 +202,6 @@ sub add_release {
}
-# download the file in $url, into $destfile.
-# returns requrest status code
-sub mirror {
- my ($url, $destfile) = @_;
- my $ua = LWP::UserAgent->new( agent => $0, timeout => 10 );
- my $response = $ua->get($url, ':content_file' => $destfile);
- return $response->code();
-}
-
sub p_r_match_score {
my ($pkg_name, $ri) = @_;
my @p = split /\W/, $pkg_name;

0 comments on commit d4bd496

Please sign in to comment.