Skip to content

Commit

Permalink
need LWP::Protocol::https with metacpan
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Jan 2, 2017
1 parent 6f75b28 commit dced3f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/App/cpanminus/script.pm
Expand Up @@ -2778,8 +2778,8 @@ sub file_mirror {
}

sub has_working_lwp {
my($self, $mirrors) = @_;
my $https = grep /^https:/, @$mirrors;
my($self, $mirrors, $https) = @_;
$https ||= grep /^https:/, @$mirrors;
eval {
require LWP::UserAgent; # no fatpack
LWP::UserAgent->VERSION(5.802);
Expand All @@ -2798,7 +2798,7 @@ sub init_tools {
}

# use --no-lwp if they have a broken LWP, to upgrade LWP
if ($self->{try_lwp} && $self->has_working_lwp($self->{mirrors})) {
if ($self->{try_lwp} && $self->has_working_lwp($self->{mirrors}, $self->{metacpan})) {
$self->chat("You have LWP $LWP::VERSION\n");
my $ua = sub {
LWP::UserAgent->new(
Expand Down

0 comments on commit dced3f3

Please sign in to comment.