summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Williams <chris@bingosnet.co.uk>2009-11-05 14:41:01 +0000
committerChris Williams <chris@bingosnet.co.uk>2009-11-05 14:41:01 +0000
commit9b583d5830e4b19cc53ab2180c0fd30418e764ed (patch)
tree0dd453f8955657306250f2ce64008c9fd7df177d
parentf395eedc84e42f36a84c71a79c9224f84ec41177 (diff)
downloadperl-9b583d5830e4b19cc53ab2180c0fd30418e764ed.tar.gz
Updated CPANPLUS::Dist::Build to cpan version 0.41_01
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm63
-rw-r--r--cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build/Constants.pm2
3 files changed, 36 insertions, 31 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 9bf94c31a6..f72f3e1c7b 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -443,7 +443,7 @@ use File::Glob qw(:case);
'CPANPLUS::Dist::Build' =>
{
'MAINTAINER' => 'bingos',
- 'DISTRIBUTION' => 'BINGOS/CPANPLUS-Dist-Build-0.40.tar.gz',
+ 'DISTRIBUTION' => 'BINGOS/CPANPLUS-Dist-Build-0.41_01.tar.gz',
'FILES' => q[cpan/CPANPLUS-Dist-Build],
'EXCLUDED' => [ qr{^inc/},
qw{ t/99_pod.t
diff --git a/cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm b/cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm
index a42e10ac3e..ff55801bbd 100644
--- a/cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm
+++ b/cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm
@@ -30,7 +30,7 @@ use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext';
local $Params::Check::VERBOSE = 1;
-$VERSION = '0.40';
+$VERSION = '0.41_01';
=pod
@@ -375,47 +375,52 @@ sub _find_prereqs {
my $prereqs = {};
- my $safe_ver = version->new('0.31_03');
+ $prereqs = $dist->find_mymeta_requires()
+ if $dist->can('find_mymeta_requires');
- my $content;
-
- if ( version->new( $Module::Build::VERSION ) >= $safe_ver and IPC::Cmd->can_capture_buffer ) {
- my @buildflags = $dist->_buildflags_as_list( $buildflags );
+ if ( keys %$prereqs ) {
+ # Ugly hack
+ }
+ else {
+ my $safe_ver = version->new('0.31_03');
+ my $content;
+ if ( version->new( $Module::Build::VERSION ) >= $safe_ver and IPC::Cmd->can_capture_buffer ) {
+ my @buildflags = $dist->_buildflags_as_list( $buildflags );
- # Use the new Build action 'prereq_data'
- my $run_perl = $conf->get_program('perlwrapper');
+ # Use the new Build action 'prereq_data'
+ my $run_perl = $conf->get_program('perlwrapper');
- unless ( scalar run( command => [$perl, $run_perl, BUILD->($dir), 'prereq_data', @buildflags],
+ unless ( scalar run( command => [$perl, $run_perl, BUILD->($dir), 'prereq_data', @buildflags],
buffer => \$content,
verbose => 0 )
- ) {
+ ) {
error( loc( "Build 'prereq_data' failed: %1 %2", $!, $content ) );
return;
- }
+ }
- }
- else {
- my $file = File::Spec->catfile( $dir, '_build', 'prereqs' );
- return unless -f $file;
+ }
+ else {
+ my $file = File::Spec->catfile( $dir, '_build', 'prereqs' );
+ return unless -f $file;
- my $fh = FileHandle->new();
+ my $fh = FileHandle->new();
- unless( $fh->open( $file ) ) {
- error( loc( "Cannot open '%1': %2", $file, $! ) );
- return;
- }
+ unless( $fh->open( $file ) ) {
+ error( loc( "Cannot open '%1': %2", $file, $! ) );
+ return;
+ }
- $content = do { local $/; <$fh> };
- }
+ $content = do { local $/; <$fh> };
+ }
- return unless $content;
- my $bphash = eval $content;
- return unless $bphash and ref $bphash eq 'HASH';
- foreach my $type ('requires', 'build_requires') {
- next unless $bphash->{$type} and ref $bphash->{$type} eq 'HASH';
- $prereqs->{$_} = $bphash->{$type}->{$_} for keys %{ $bphash->{$type} };
+ return unless $content;
+ my $bphash = eval $content;
+ return unless $bphash and ref $bphash eq 'HASH';
+ foreach my $type ('requires', 'build_requires') {
+ next unless $bphash->{$type} and ref $bphash->{$type} eq 'HASH';
+ $prereqs->{$_} = $bphash->{$type}->{$_} for keys %{ $bphash->{$type} };
+ }
}
-
# Temporary fix
delete $prereqs->{'perl'};
diff --git a/cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build/Constants.pm b/cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build/Constants.pm
index c04c247c6c..2bf836acc3 100644
--- a/cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build/Constants.pm
+++ b/cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build/Constants.pm
@@ -9,7 +9,7 @@ BEGIN {
require Exporter;
use vars qw[$VERSION @ISA @EXPORT];
- $VERSION = '0.40';
+ $VERSION = '0.41_01';
@ISA = qw[Exporter];
@EXPORT = qw[ BUILD_DIR BUILD ];
}