diff options
author | Chris Williams <chris@bingosnet.co.uk> | 2009-11-18 12:44:21 +0000 |
---|---|---|
committer | Chris Williams <chris@bingosnet.co.uk> | 2009-11-18 12:44:21 +0000 |
commit | 0a18d57236ee1f3a9adcd97dded481fe3efb9e78 (patch) | |
tree | 39031afa22e5a3ea39071b7c991773c6aea09d0a /cpan/CPANPLUS-Dist-Build | |
parent | 79ff69f3f0afea45ad1d7e28fe7df52129df3f81 (diff) | |
download | perl-0a18d57236ee1f3a9adcd97dded481fe3efb9e78.tar.gz |
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.
Diffstat (limited to 'cpan/CPANPLUS-Dist-Build')
-rw-r--r-- | cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm | 27 | ||||
-rw-r--r-- | cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build/Constants.pm | 2 |
2 files changed, 17 insertions, 12 deletions
diff --git a/cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm b/cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm index e9cb095eba..2bb5070815 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 9d196ac616..6fc6a18300 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 ]; } |