diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/CPANPLUS/Dist')
-rw-r--r-- | Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Autobundle.pm | 3 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Base.pm | 4 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Build.pm | 13 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Build/Constants.pm | 4 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/CPANPLUS/Dist/MM.pm | 31 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Sample.pm | 4 |
6 files changed, 48 insertions, 11 deletions
diff --git a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Autobundle.pm b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Autobundle.pm index 546f1ba6382..d5e45f3eca0 100644 --- a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Autobundle.pm +++ b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Autobundle.pm @@ -1,10 +1,13 @@ package CPANPLUS::Dist::Autobundle; +use deprecate; use strict; use warnings; use CPANPLUS::Error qw[error msg]; use Params::Check qw[check]; use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext'; +use vars qw[$VERSION]; +$VERSION = "0.9135"; use base qw[CPANPLUS::Dist::Base]; diff --git a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Base.pm b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Base.pm index 8e4e02f1f50..73736d9e4da 100644 --- a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Base.pm +++ b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Base.pm @@ -1,11 +1,11 @@ package CPANPLUS::Dist::Base; +use deprecate; use strict; use base qw[CPANPLUS::Dist]; use vars qw[$VERSION]; -$VERSION = $CPANPLUS::Internals::VERSION = $CPANPLUS::Internals::VERSION; - +$VERSION = "0.9135"; =head1 NAME diff --git a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Build.pm b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Build.pm index 702d606115b..d938749c825 100644 --- a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Build.pm +++ b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Build.pm @@ -1,5 +1,7 @@ package CPANPLUS::Dist::Build; +use if $] > 5.017, 'deprecate'; + use strict; use warnings; use vars qw[@ISA $STATUS $VERSION]; @@ -30,7 +32,7 @@ use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext'; local $Params::Check::VERBOSE = 1; -$VERSION = '0.62'; +$VERSION = '0.70'; =pod @@ -327,6 +329,15 @@ sub prepare { $fail++; last RUN; } + unless ( BUILD->( $dir ) ) { + error( loc( "Build.PL failed to generate a Build script: %1", $prep_output ) ); + if ( $conf->get_conf('cpantest') ) { + $status->{stage} = 'prepare'; + $status->{capture} = $prep_output; + } + $fail++; last RUN; + } + msg( $prep_output, 0 ); my $prereqs = $self->status->prereqs; diff --git a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Build/Constants.pm b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Build/Constants.pm index c0fa040ffc5..f020093c9c7 100644 --- a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Build/Constants.pm +++ b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Build/Constants.pm @@ -1,5 +1,7 @@ package CPANPLUS::Dist::Build::Constants; +use if $] > 5.017, 'deprecate'; + use strict; use warnings; use File::Spec; @@ -9,7 +11,7 @@ BEGIN { require Exporter; use vars qw[$VERSION @ISA @EXPORT]; - $VERSION = '0.62'; + $VERSION = '0.70'; @ISA = qw[Exporter]; @EXPORT = qw[ BUILD_DIR BUILD CPDB_PERL_WRAPPER]; } diff --git a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/MM.pm b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/MM.pm index cd428691bcf..35f31b7b089 100644 --- a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/MM.pm +++ b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/MM.pm @@ -1,9 +1,11 @@ package CPANPLUS::Dist::MM; +use deprecate; -use warnings; use strict; -use vars qw[@ISA $STATUS]; +use warnings; +use vars qw[@ISA $STATUS $VERSION]; use base 'CPANPLUS::Dist::Base'; +$VERSION = "0.9135"; use CPANPLUS::Internals::Constants; use CPANPLUS::Internals::Constants::Report; @@ -221,14 +223,14 @@ sub prepare { } my $args; - my( $force, $verbose, $perl, @mmflags, $prereq_target, $prereq_format, + my( $force, $verbose, $perl, $mmflags, $prereq_target, $prereq_format, $prereq_build ); { local $Params::Check::ALLOW_UNKNOWN = 1; my $tmpl = { perl => { default => $^X, store => \$perl }, makemakerflags => { default => $conf->get_conf('makemakerflags') || '', - store => \$mmflags[0] }, + store => \$mmflags }, force => { default => $conf->get_conf('force'), store => \$force }, verbose => { default => $conf->get_conf('verbose'), @@ -242,6 +244,7 @@ sub prepare { $args = check( $tmpl, \%hash ) or return; } + my @mmflags = $dist->_split_like_shell( $mmflags ); ### maybe we already ran a create on this object? ### return 1 if $dist->status->prepared && !$force; @@ -578,6 +581,8 @@ sub create { $args = check( $tmpl, \%hash ) or return; } + my @makeflags = $dist->_split_like_shell( $makeflags ); + ### maybe we already ran a create on this object? ### make sure we add to include path again, just in case we came from ### ->save_state, at which point we need to restore @INC/$PERL5LIB @@ -641,7 +646,7 @@ sub create { "not running again unless you force", $make, $self->module ), $verbose ); } else { - unless(scalar run( command => [$make, $makeflags], + unless(scalar run( command => [$make, @makeflags], buffer => \$captured, verbose => $verbose ) ) { @@ -687,7 +692,7 @@ sub create { ### XXX need to add makeflags here too? ### yes, but they should really be split out -- see bug #4143 if( scalar run( - command => [$make, 'test', $makeflags], + command => [$make, 'test', @makeflags], buffer => \$captured, verbose => $run_verbose, ) ) { @@ -815,6 +820,7 @@ sub install { return; } + my @makeflags = $dist->_split_like_shell( $makeflags ); $dist->status->_install_args( $args ); @@ -829,7 +835,7 @@ sub install { ### 'make install' section ### ### XXX need makeflags here too? ### yes, but they should really be split out.. see bug #4143 - my $cmd = [$make, 'install', $makeflags]; + my $cmd = [$make, 'install', @makeflags]; my $sudo = $conf->get_program('sudo'); unshift @$cmd, $sudo if $sudo and $>; @@ -1016,6 +1022,17 @@ sub dist_dir { return $distdir; } +sub _split_like_shell { + my ($self, $string) = @_; + + return () unless defined($string); + return @$string if ref $string eq 'ARRAY'; + $string =~ s/^\s+|\s+$//g; + return () unless length($string); + + require Text::ParseWords; + return Text::ParseWords::shellwords($string); +} 1; diff --git a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Sample.pm b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Sample.pm index 0b0939208ff..e03d66f9836 100644 --- a/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Sample.pm +++ b/Master/tlpkg/tlperl/lib/CPANPLUS/Dist/Sample.pm @@ -1,4 +1,8 @@ package CPANPLUS::Dist::Sample; +use deprecate; + +use vars qw[$VERSION]; +$VERSION = "0.9135"; =pod |