Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: miyagawa/cpanminus
...
head fork: miyagawa/cpanminus
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Commits on May 11, 2012
@miyagawa Changed the behavior of --mirror-index so that it won't fall back to …
…the default index. Fixes #150
0745cdb
@miyagawa Checking in changes prior to tagging of version 1.5012.
Changelog diff is:

diff --git a/Changes b/Changes
index cbe2ffb..e475125 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,10 @@
 See http://github.com/miyagawa/cpanminus/ for the latest development.

+1.5012 Fri May 11 05:47:56 CEST 2012
+   [Improvements]
+      - Change the behavior of --mirror-index so that it won't fallback to CPAN mirrors #150 (thaljef)
+      - Support v-strings in versions specified install [perl-carton/carton#48]
+
 1.5011 Thu Apr 12 18:57:06 JST 2012
    [Improvements]
       - Point default mirror to www.cpan.org #148
7e079af
View
5 Changes
@@ -1,5 +1,10 @@
See http://github.com/miyagawa/cpanminus/ for the latest development.
+1.5012 Fri May 11 05:47:56 CEST 2012
+ [Improvements]
+ - Change the behavior of --mirror-index so that it won't fallback to CPAN mirrors #150 (thaljef)
+ - Support v-strings in versions specified install [https://github.com/miyagawa/carton/issues/48]
+
1.5011 Thu Apr 12 18:57:06 JST 2012
[Improvements]
- Point default mirror to www.cpan.org #148
View
41 cpanm
@@ -18,7 +18,7 @@ my %fatpacked;
$fatpacked{"App/cpanminus.pm"} = <<'APP_CPANMINUS';
package App::cpanminus;
- our $VERSION = "1.5011";
+ our $VERSION = "1.5012";
=head1 NAME
@@ -326,7 +326,7 @@ $fatpacked{"App/cpanminus/script.pm"} = <<'APP_CPANMINUS_SCRIPT';
use constant WIN32 => $^O eq 'MSWin32';
use constant SUNOS => $^O eq 'solaris';
- our $VERSION = "1.5011";
+ our $VERSION = "1.5012";
my $quote = WIN32 ? q/"/ : q/'/;
@@ -479,7 +479,7 @@ $fatpacked{"App/cpanminus/script.pm"} = <<'APP_CPANMINUS_SCRIPT';
$module = join '::', grep { $_ } File::Spec->splitdir($dirs), $file;
}
- ($module, my $version) = split /\~/, $module, 2 if $module =~ /\~[\d\._]+$/;
+ ($module, my $version) = split /\~/, $module, 2 if $module =~ /\~[v\d\._]+$/;
if ($self->{skip_satisfied} or defined $version) {
$self->check_libs;
my($ok, $local) = $self->check_module($module, $version || 0);
@@ -620,6 +620,16 @@ $fatpacked{"App/cpanminus/script.pm"} = <<'APP_CPANMINUS_SCRIPT';
sub search_module {
my($self, $module, $version) = @_;
+ if ($self->{mirror_index}) {
+ $self->chat("Searching $module on mirror index $self->{mirror_index} ...\n");
+ my $pkg = $self->search_mirror_index_file($self->{mirror_index}, $module, $version);
+ if (not $pkg) {
+ $self->diag_fail("Finding $module ($version) on mirror index $self->{mirror_index} failed.");
+ return;
+ }
+ return $pkg;
+ }
+
unless ($self->{mirror_only}) {
if ($self->{metacpan}) {
require JSON::PP;
@@ -662,12 +672,6 @@ $fatpacked{"App/cpanminus/script.pm"} = <<'APP_CPANMINUS_SCRIPT';
$self->diag_fail("Finding $module on search.cpan.org failed.");
}
- if ($self->{mirror_index}) {
- $self->chat("Searching $module on mirror index $self->{mirror_index} ...\n");
- my $pkg = $self->search_mirror_index_file($self->{mirror_index}, $module, $version);
- return $pkg if $pkg;
- }
-
MIRROR: for my $mirror (@{ $self->{mirrors} }) {
$self->chat("Searching $module on mirror $mirror ...\n");
my $name = '02packages.details.txt.gz';
@@ -1671,6 +1675,16 @@ $fatpacked{"App/cpanminus/script.pm"} = <<'APP_CPANMINUS_SCRIPT';
sub configure_this {
my($self, $dist) = @_;
+ if (-e 'cpanfile' && $self->{installdeps}) {
+ require CPAN::cpanfile;
+ $dist->{cpanfile} = eval { CPAN::cpanfile->load('cpanfile') };
+ return {
+ configured => 1,
+ configured_ok => !!$dist->{cpanfile},
+ use_module_build => 0,
+ };
+ }
+
if ($self->{skip_configure}) {
my $eumm = -e 'Makefile';
my $mb = -e 'Build' && -f _;
@@ -1845,6 +1859,15 @@ $fatpacked{"App/cpanminus/script.pm"} = <<'APP_CPANMINUS_SCRIPT';
sub extract_meta_prereqs {
my($self, $dist) = @_;
+ if ($dist->{cpanfile}) {
+ my $prereq = $dist->{cpanfile}->prereq;
+ my @phase = $self->{notest} ? qw( build runtime ) : qw( build test runtime );
+ require CPAN::Meta::Requirements;
+ my $req = CPAN::Meta::Requirements->new;
+ $req->add_requirements($prereq->requirements_for($_, 'requires')) for @phase;
+ return %{$req->as_string_hash};
+ }
+
my $meta = $dist->{meta};
my @deps;
View
2  lib/App/cpanminus.pm
@@ -1,5 +1,5 @@
package App::cpanminus;
-our $VERSION = "1.5011";
+our $VERSION = "1.5012";
=head1 NAME
View
8 lib/App/cpanminus/script.pm
@@ -14,7 +14,7 @@ use Symbol ();
use constant WIN32 => $^O eq 'MSWin32';
use constant SUNOS => $^O eq 'solaris';
-our $VERSION = "1.5011";
+our $VERSION = "1.5012";
my $quote = WIN32 ? q/"/ : q/'/;
@@ -311,7 +311,11 @@ sub search_module {
if ($self->{mirror_index}) {
$self->chat("Searching $module on mirror index $self->{mirror_index} ...\n");
my $pkg = $self->search_mirror_index_file($self->{mirror_index}, $module, $version);
- return $pkg if $pkg;
+ if (not $pkg) {
+ $self->diag_fail("Finding $module ($version) on mirror index $self->{mirror_index} failed.");
+ return;
+ }
+ return $pkg;
}
unless ($self->{mirror_only}) {
View
2  xt/cascade_search.t
@@ -10,6 +10,6 @@ run "-L", $local_lib, "--mirror-index", "xt/mirror.txt", "--skip-installed", "Ha
like last_build_log, qr/Hash::MultiValue is up to date/;
run "-L", $local_lib, "--mirror-index", "xt/mirror.txt", "--skip-installed", "--cascade-search", "Hash::MultiValue~0.03";
-like last_build_log, qr/installed Hash-MultiValue/;
+like last_build_log, qr/Couldn't find .* Hash::MultiValue/;
done_testing;

No commit comments for this range

Something went wrong with that request. Please try again.