From: Chris Williams Date: Wed, 18 Nov 2009 12:44:21 +0000 (+0000) Subject: Update CPANPLUS::Dist::Build to cpan version 0.44 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0a18d57236ee1f3a9adcd97dded481fe3efb9e78;p=p5sagit%2Fp5-mst-13.2.git Update CPANPLUS::Dist::Build to cpan version 0.44 Changes for 0.44 ================ Make the prereq resolving fallback to _build/ querying if the 'prereq_data' action fails. The edge-case of a distribution that is bundling an older version of Module::Build exposed this flaw. Thanks to Johan Vromans for questioning the test report for EekBoek. --- diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 5ffa715..35def4b 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.42.tar.gz', + 'DISTRIBUTION' => 'BINGOS/CPANPLUS-Dist-Build-0.44.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 e9cb095..2bb5070 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.42'; +$VERSION = '0.44'; =pod @@ -384,7 +384,8 @@ sub _find_prereqs { 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 ) { + PREREQS: { + 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' @@ -395,7 +396,10 @@ sub _find_prereqs { verbose => 0 ) ) { error( loc( "Build 'prereq_data' failed: %1 %2", $!, $content ) ); - return; + #return; + } + else { + last PREREQS; } } @@ -412,14 +416,15 @@ sub _find_prereqs { $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 9d196ac..6fc6a18 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.42'; + $VERSION = '0.44'; @ISA = qw[Exporter]; @EXPORT = qw[ BUILD_DIR BUILD ]; }