From: Chris Williams Date: Thu, 5 Nov 2009 14:41:01 +0000 (+0000) Subject: Updated CPANPLUS::Dist::Build to cpan version 0.41_01 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9b583d5830e4b19cc53ab2180c0fd30418e764ed;p=p5sagit%2Fp5-mst-13.2.git Updated CPANPLUS::Dist::Build to cpan version 0.41_01 --- diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 9bf94c3..f72f3e1 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 a42e10a..ff55801 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 c04c247..2bf836a 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 ]; }