diff options
Diffstat (limited to 'community/perl-app-cpanminus/app-cpanminus-https.patch')
-rw-r--r-- | community/perl-app-cpanminus/app-cpanminus-https.patch | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/community/perl-app-cpanminus/app-cpanminus-https.patch b/community/perl-app-cpanminus/app-cpanminus-https.patch new file mode 100644 index 00000000000..ca174fa5790 --- /dev/null +++ b/community/perl-app-cpanminus/app-cpanminus-https.patch @@ -0,0 +1,133 @@ +--- a/lib/App/cpanminus/https.pm ++++ b/lib/App/cpanminus/https.pm +@@ -1,4 +1,4 @@ +-package App::cpanminus; ++package App::cpanminus::https; + our $VERSION = "1.7047"; + + =encoding utf8 +--- a/lib/App/cpanminus/https/fatscript.pm ++++ b/lib/App/cpanminus/https/fatscript.pm +@@ -1,4 +1,4 @@ +-package App::cpanminus::fatscript; ++package App::cpanminus::https::fatscript; + # + # This is a pre-compiled source code for the cpanm (cpanminus) program. + # For more details about how to install cpanm, go to the following URL: +@@ -469,7 +469,7 @@ + mirrors => [], + mirror_only => undef, + mirror_index => undef, +- cpanmetadb => "http://cpanmetadb.plackperl.org/v1.0/", ++ cpanmetadb => "https://cpanmetadb.plackperl.org/v1.0/", + perl => $^X, + argv => [], + local_lib => undef, +@@ -565,7 +565,7 @@ + 'h|help' => sub { $self->{action} = 'show_help' }, + 'V|version' => sub { $self->{action} = 'show_version' }, + 'perl=s' => sub { +- $self->diag("--perl is deprecated since it's known to be fragile in figuring out dependencies. Run `$_[1] -S cpanm` instead.\n", 1); ++ $self->diag("--perl is deprecated since it's known to be fragile in figuring out dependencies. Run `$_[1] -S cpanms` instead.\n", 1); + $self->{perl} = $_[1]; + }, + 'l|local-lib=s' => sub { $self->{local_lib} = $self->maybe_abs($_[1]) }, +@@ -810,7 +810,7 @@ + } + } + +- $self->chat("cpanm (App::cpanminus) $VERSION on perl $] built for $Config{archname}\n" . ++ $self->chat("cpanms (App::cpanminus) $VERSION on perl $] built for $Config{archname}\n" . + "Work directory is $self->{base}\n"); + } + +@@ -926,7 +926,7 @@ + sub search_metacpan { + my($self, $module, $version, $dev_release) = @_; + +- my $metacpan_uri = 'http://fastapi.metacpan.org/v1/download_url/'; ++ my $metacpan_uri = 'https://fastapi.metacpan.org/v1/download_url/'; + + my $url = $metacpan_uri . $module; + +@@ -943,7 +943,7 @@ + if ($dist_meta && $dist_meta->{download_url}) { + (my $distfile = $dist_meta->{download_url}) =~ s!.+/authors/id/!!; + local $self->{mirrors} = $self->{mirrors}; +- $self->{mirrors} = [ 'http://cpan.metacpan.org' ]; ++ $self->{mirrors} = [ 'https://cpan.metacpan.org' ]; + return $self->cpan_module($module, $distfile, $dist_meta->{version}); + } + +@@ -1019,7 +1019,7 @@ + for my $try (sort { $b->{version_obj} cmp $a->{version_obj} } @found) { + if ($self->satisfy_version($module, $try->{version_obj}, $version)) { + local $self->{mirrors} = $self->{mirrors}; +- unshift @{$self->{mirrors}}, 'http://backpan.perl.org' ++ unshift @{$self->{mirrors}}, 'https://backpan.perl.org' + unless $try->{latest}; + return $self->cpan_module($module, $try->{distfile}, $try->{version}); + } +@@ -1099,7 +1099,7 @@ + sub show_version { + my $self = shift; + +- print "cpanm (App::cpanminus) version $VERSION ($0)\n"; ++ print "cpanms (App::cpanminus) version $VERSION ($0)\n"; + print "perl version $] ($^X)\n\n"; + + print " \%Config:\n"; +@@ -1125,7 +1125,7 @@ + my $self = shift; + + if ($_[0]) { +- print <<USAGE; ++ print <<USAGE =~ s/cpanm/cpanms/gr; + Usage: cpanm [options] Module [...] + + Try `cpanm --help` or `man cpanm` for more options. +@@ -1133,7 +1133,7 @@ + return; + } + +- print <<HELP; ++ print <<HELP =~ s/cpanm(?!')/cpanms/gr; + Usage: cpanm [options] Module [...] + + Options: +@@ -1247,7 +1247,7 @@ + ! - Configure local::lib in your existing shell to set PERL_MM_OPT etc. + ! - Install local::lib by running the following commands + ! +- ! cpanm --local-lib=~/perl5 local::lib && eval \$(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) ++ ! cpanms --local-lib=~/perl5 local::lib && eval \$(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) + ! + DIAG + sleep 2; +@@ -1317,7 +1317,7 @@ + + require local::lib; + { +- local $0 = 'cpanm'; # so curl/wget | perl works ++ local $0 = 'cpanms'; # so curl/wget | perl works + $base ||= "~/perl5"; + $base = local::lib->resolve_path($base); + if ($self->{self_contained}) { +@@ -1671,7 +1671,7 @@ + sub configure_mirrors { + my $self = shift; + unless (@{$self->{mirrors}}) { +- $self->{mirrors} = [ 'http://www.cpan.org' ]; ++ $self->{mirrors} = [ 'https://www.cpan.org' ]; + } + for (@{$self->{mirrors}}) { + s!^/!file:///!; +@@ -3180,7 +3180,7 @@ + + sub has_working_lwp { + my($self, $mirrors) = @_; +- my $https = grep /^https:/, @$mirrors; ++ my $https = @$mirrors == 0 || grep /^https:/, @$mirrors; # default mirrors use https + eval { + require LWP::UserAgent; # no fatpack + LWP::UserAgent->VERSION(5.802); |