Skip to content

Commit

Permalink
mirror is LWP::Simple's method
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuelfomberg committed Jul 3, 2013
1 parent 72e816a commit d4bd496
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/Dist/Surveyor/MakeCpan.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d4bd496

Please sign in to comment.