Permalink
Browse files

Checking in changes prior to tagging of version 1.5003.

Changelog diff is:

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

+1.5003 Wed Oct 19 16:29:29 JST 2011
+   [Bug Fixes]
+      - Use ExtUtils::Install to install meta files and let --sudo run it with sudo #124
+
 1.5002 Tue Oct 18 09:06:17 JST 2011
    [Bug Fixes]
       - Make sure to include non-core perl modules in -L that are installed in 'perl' by mistake
  • Loading branch information...
miyagawa committed Oct 19, 2011
1 parent 812775d commit 60c617a504bf27325c823f7b080eb0a35ef76a99
Showing with 25 additions and 15 deletions.
  1. +4 −0 Changes
  2. +19 −12 cpanm
  3. +1 −2 lib/App/cpanminus.pm
  4. +1 −1 lib/App/cpanminus/script.pm
View
@@ -1,5 +1,9 @@
See http://github.com/miyagawa/cpanminus/ for the latest development.
+1.5003 Wed Oct 19 16:29:29 JST 2011
+ [Bug Fixes]
+ - Use ExtUtils::Install to install meta files and let --sudo run it with sudo #124
+
1.5002 Tue Oct 18 09:06:17 JST 2011
[Bug Fixes]
- Make sure to include non-core perl modules in -L that are installed in 'perl' by mistake
View
31 cpanm
@@ -18,8 +18,7 @@ my %fatpacked;
$fatpacked{"App/cpanminus.pm"} = <<'APP_CPANMINUS';
package App::cpanminus;
- our $VERSION = "1.5002";
- $VERSION = eval $VERSION;
+ our $VERSION = "1.5003";
=head1 NAME
@@ -327,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.5002";
+ our $VERSION = "1.5003";
my $quote = WIN32 ? q/"/ : q/'/;
@@ -1732,19 +1731,13 @@ $fatpacked{"App/cpanminus/script.pm"} = <<'APP_CPANMINUS_SCRIPT';
my $base = ($ENV{PERL_MM_OPT} || '') =~ /INSTALL_BASE=/
? ($self->install_base($ENV{PERL_MM_OPT}) . "/lib/perl5") : $Config{sitelibexp};
- my $dir = "$base/$Config{archname}/.meta/$dist->{distvname}";
- File::Path::mkpath([ $dir ], 0, 0777);
-
- # Existence of MYMETA.* Depends on EUMM/M::B versions and CPAN::Meta
- if (-e "MYMETA.json") {
- File::Copy::copy("MYMETA.json", "$dir/MYMETA.json");
- }
-
my $provides = $self->_merge_hashref(
map Module::Metadata->package_versions_from_directory($_),
qw( blib/lib blib/arch ) # FCGI.pm :(
);
+ mkdir "blib/meta", 0777 or die $!;
+
my $local = {
name => $module_name,
module => $module,
@@ -1755,8 +1748,22 @@ $fatpacked{"App/cpanminus/script.pm"} = <<'APP_CPANMINUS_SCRIPT';
};
require JSON::PP;
- open my $fh, ">", "$dir/install.json" or die $!;
+ open my $fh, ">", "blib/meta/install.json" or die $!;
print $fh JSON::PP::encode_json($local);
+
+ # Existence of MYMETA.* Depends on EUMM/M::B versions and CPAN::Meta
+ if (-e "MYMETA.json") {
+ File::Copy::copy("MYMETA.json", "blib/meta/MYMETA.json");
+ }
+
+ my @cmd = (
+ ($self->{sudo} ? 'sudo' : ()),
+ $^X,
+ '-MExtUtils::Install=install',
+ '-e',
+ qq[install({ 'blib/meta' => "$base/$Config{archname}/.meta/$dist->{distvname}" })],
+ );
+ $self->run(\@cmd);
}
sub _merge_hashref {
View
@@ -1,6 +1,5 @@
package App::cpanminus;
-our $VERSION = "1.5002";
-$VERSION = eval $VERSION;
+our $VERSION = "1.5003";
=head1 NAME
@@ -14,7 +14,7 @@ use Symbol ();
use constant WIN32 => $^O eq 'MSWin32';
use constant SUNOS => $^O eq 'solaris';
-our $VERSION = "1.5002";
+our $VERSION = "1.5003";
my $quote = WIN32 ? q/"/ : q/'/;

0 comments on commit 60c617a

Please sign in to comment.