diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2009-03-21 17:13:19 +0100 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2009-03-21 17:15:00 +0100 |
commit | baddfc47200940b4403c4d51ab778cf6e1032ec1 (patch) | |
tree | 9698f62ee3f9500b1f956c6561a55af2b07500e9 | |
parent | 16bf6aa6d68d98291990dcdbb6c884269bf80b18 (diff) | |
download | perl-baddfc47200940b4403c4d51ab778cf6e1032ec1.tar.gz |
Update CPANPLUS::Dist::Build to 0.16
Also set BinGOs as the maintainer for CPANPLUS::Dist::Build.
-rw-r--r-- | Porting/Maintainers.pl | 3 | ||||
-rw-r--r-- | lib/CPANPLUS/Dist/Build.pm | 35 | ||||
-rw-r--r-- | lib/CPANPLUS/Dist/Build/Constants.pm | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index a56a9855dc..d1006aaf9b 100644 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -18,6 +18,7 @@ package Maintainers; 'arandal' => 'Allison Randal <allison@perl.org>', 'audreyt' => 'Audrey Tang <cpan@audreyt.org>', 'avar' => 'Ævar Arnfjörð Bjarmason <avar@cpan.org>', + 'bingos' => 'Chris Williams <chris@bingosnet.co.uk>', 'chorny' => "Alexandr Ciornii <alexchorny\100gmail.com>", 'corion' => 'Max Maischein <corion@corion.net>', 'craig' => 'Craig Berry <craigberry@mac.com>', @@ -270,7 +271,7 @@ package Maintainers; 'CPANPLUS::Dist::Build' => { - 'MAINTAINER' => 'kwilliams', + 'MAINTAINER' => 'bingos', 'FILES' => q[lib/CPANPLUS/Dist/Build.pm lib/CPANPLUS/Dist/Build], 'CPAN' => 1, 'UPSTREAM' => 'cpan', diff --git a/lib/CPANPLUS/Dist/Build.pm b/lib/CPANPLUS/Dist/Build.pm index 550041be2d..57b908a0f4 100644 --- a/lib/CPANPLUS/Dist/Build.pm +++ b/lib/CPANPLUS/Dist/Build.pm @@ -31,7 +31,7 @@ use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext'; local $Params::Check::VERBOSE = 1; -$VERSION = '0.14'; +$VERSION = '0.16'; =pod @@ -267,7 +267,7 @@ sub prepare { local @INC = CPANPLUS::inc->original_inc; ### this will generate warnings under anything lower than M::B 0.2606 - my %buildflags = $dist->_buildflags_as_hash( $buildflags ); + my @buildflags = $dist->_buildflags_as_list( $buildflags ); $dist->status->_buildflags( $buildflags ); my $fail; @@ -312,7 +312,7 @@ sub prepare { my $env = 'ENV_CPANPLUS_IS_EXECUTING'; local $ENV{$env} = BUILD_PL->( $dir ); - unless ( scalar run( command => [$perl, BUILD_PL->($dir), $buildflags], + unless ( scalar run( command => [$perl, BUILD_PL->($dir), @buildflags], buffer => \$prep_output, verbose => $verbose ) ) { @@ -379,9 +379,11 @@ sub _find_prereqs { my $content; if ( version->new( $Module::Build::VERSION ) >= $safe_ver and ! ON_WIN32 ) { + my @buildflags = $dist->_buildflags_as_list( $buildflags ); + # Use the new Build action 'prereq_data' - unless ( scalar run( command => [$perl, BUILD->($dir), 'prereq_data', $buildflags], + unless ( scalar run( command => [$perl, BUILD->($dir), 'prereq_data', @buildflags], buffer => \$content, verbose => 0 ) ) { @@ -540,7 +542,7 @@ sub create { if $self->best_path_to_module_build; ### this will generate warnings under anything lower than M::B 0.2606 - my %buildflags = $dist->_buildflags_as_hash( $buildflags ); + my @buildflags = $dist->_buildflags_as_list( $buildflags ); $dist->status->_buildflags( $buildflags ); my $fail; my $prereq_fail; my $test_fail; @@ -573,7 +575,7 @@ sub create { my $captured; - unless ( scalar run( command => [$perl, BUILD->($dir), $buildflags], + unless ( scalar run( command => [$perl, BUILD->($dir), @buildflags], buffer => \$captured, verbose => $verbose ) ) { @@ -595,7 +597,7 @@ sub create { unless( $skiptest ) { my $test_output; my $flag = ON_VMS ? '"test"' : 'test'; - my $cmd = [$perl, BUILD->($dir), $flag, $buildflags]; + my $cmd = [$perl, BUILD->($dir), $flag, @buildflags]; unless ( scalar run( command => $cmd, buffer => \$test_output, verbose => $verbose ) @@ -704,7 +706,8 @@ sub install { } my $fail; - my $buildflags = $dist->status->_buildflags; + my @buildflags = $dist->_buildflags_as_list( $dist->status->_buildflags ); + ### hmm, how is this going to deal with sudo? ### for now, check effective uid, if it's not root, ### shell out, otherwise use the method @@ -715,7 +718,7 @@ sub install { ### M::B at the top of the build.pl ### On VMS, flags need to be quoted my $flag = ON_VMS ? '"install"' : 'install'; - my $cmd = [$perl, BUILD->($dir), $flag, $buildflags]; + my $cmd = [$perl, BUILD->($dir), $flag, @buildflags]; my $sudo = $conf->get_program('sudo'); unshift @$cmd, $sudo if $sudo; @@ -729,11 +732,9 @@ sub install { $fail++; } } else { - my %buildflags = $dist->_buildflags_as_hash($buildflags); - my $install_output; my $flag = ON_VMS ? '"install"' : 'install'; - my $cmd = [$perl, BUILD->($dir), $flag, $buildflags]; + my $cmd = [$perl, BUILD->($dir), $flag, @buildflags]; unless( scalar run( command => $cmd, buffer => \$install_output, verbose => $verbose ) @@ -754,15 +755,13 @@ sub install { return $dist->status->installed( $fail ? 0 : 1 ); } -### returns the string 'foo=bar zot=quux' as (foo => bar, zot => quux) -sub _buildflags_as_hash { +### returns the string 'foo=bar --zot quux' +### as the list 'foo=bar', '--zot', 'qux' +sub _buildflags_as_list { my $self = shift; my $flags = shift or return; - my @argv = Module::Build->split_like_shell($flags); - my ($argv) = Module::Build->read_args(@argv); - - return %$argv; + return Module::Build->split_like_shell($flags); } =head1 AUTHOR diff --git a/lib/CPANPLUS/Dist/Build/Constants.pm b/lib/CPANPLUS/Dist/Build/Constants.pm index 52db6b7605..4b9ac18ce4 100644 --- a/lib/CPANPLUS/Dist/Build/Constants.pm +++ b/lib/CPANPLUS/Dist/Build/Constants.pm @@ -9,7 +9,7 @@ BEGIN { require Exporter; use vars qw[$VERSION @ISA @EXPORT]; - $VERSION = '0.14'; + $VERSION = '0.16'; @ISA = qw[Exporter]; @EXPORT = qw[ BUILD_DIR BUILD ]; } |