summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2012-02-24 21:42:41 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2012-02-24 22:42:22 +0000
commit1f629e57df116eb70c42f5e4306c2a1eb93b4c93 (patch)
treed97de90e095b8736885a05aba3e74b825423d7ab
parent236cbe8d7a6747fb6144c93dd767895f8acffd00 (diff)
downloadperl-smoke-me/module-build.tar.gz
Update Module-Build to CPAN version 0.40smoke-me/module-build
[DELTA] 0.40 - Fri Feb 24 18:47:48 CET 2012 - Released 0.39_02 as 0.40 without any code changes 0.39_02 - Thu Feb 17 00:33:18 MET 2012 [BUG FIXES] - Fixed bug where modules without $VERSION might have a version of '0' listed in 'provides' metadata, which will be rejected by PAUSE [David Golden, reported by Christopher Fields] - Fixed bug in PodParser to allow numerals in module names [Tokuhirom] - Fixed bug where giving arguments twice led to them becoming arrays, resulting in install paths like "ARRAY(0xdeadbeef)/lib/Foo.pm" [Leon Timmermans] [DOCUMENTATION] - Fixed deviance from alphabetical order in documentation of constructor parameters. [Eric Brine] - Add documentation for configure_requires constructor parameter. [Eric Brine] - Change some of the docs' language describing relationship to MakeMaker. [Ken Williams] [OTHER] - List Perl-Toolchain-Gang repo as official repo
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--cpan/Module-Build/Changes34
-rw-r--r--cpan/Module-Build/lib/Module/Build.pm26
-rw-r--r--cpan/Module-Build/lib/Module/Build/API.pod40
-rw-r--r--cpan/Module-Build/lib/Module/Build/Authoring.pod2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Base.pm470
-rw-r--r--cpan/Module-Build/lib/Module/Build/Compat.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Config.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Cookbook.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Dumper.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/ModuleInfo.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Notes.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/PPMMaker.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/Amiga.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/Default.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/EBCDIC.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/MPEiX.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/MacOS.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/RiscOS.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/Unix.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/VMS.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/VOS.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/Windows.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/aix.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/cygwin.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/darwin.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/Platform/os2.pm2
-rw-r--r--cpan/Module-Build/lib/Module/Build/PodParser.pm4
-rw-r--r--cpan/Module-Build/lib/inc/latest.pm2
-rw-r--r--cpan/Module-Build/lib/inc/latest/private.pm2
-rw-r--r--cpan/Module-Build/t/install.t6
-rw-r--r--cpan/Module-Build/t/metadata.t15
-rw-r--r--pod/perldelta.pod4
33 files changed, 367 insertions, 282 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 928dd6381b..07dcb05a4f 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1227,7 +1227,7 @@ use File::Glob qw(:case);
'Module::Build' => {
'MAINTAINER' => 'kwilliams',
- 'DISTRIBUTION' => 'DAGOLDEN/Module-Build-0.39_01.tar.gz',
+ 'DISTRIBUTION' => 'LEONT/Module-Build-0.40.tar.gz',
'FILES' => q[cpan/Module-Build],
'EXCLUDED' => [
qw( t/par.t
diff --git a/cpan/Module-Build/Changes b/cpan/Module-Build/Changes
index 02f73b079f..f5b158c90c 100644
--- a/cpan/Module-Build/Changes
+++ b/cpan/Module-Build/Changes
@@ -1,5 +1,39 @@
Revision history for Perl extension Module::Build.
+0.40 - Fri Feb 24 18:47:48 CET 2012
+
+ - Released 0.39_02 as 0.40 without any code changes
+
+0.39_02 - Thu Feb 17 00:33:18 MET 2012
+
+ [BUG FIXES]
+
+ - Fixed bug where modules without $VERSION might have a version of '0'
+ listed in 'provides' metadata, which will be rejected by PAUSE
+ [David Golden, reported by Christopher Fields]
+
+ - Fixed bug in PodParser to allow numerals in module names
+ [Tokuhirom]
+
+ - Fixed bug where giving arguments twice led to them becoming arrays,
+ resulting in install paths like "ARRAY(0xdeadbeef)/lib/Foo.pm"
+ [Leon Timmermans]
+
+ [DOCUMENTATION]
+
+ - Fixed deviance from alphabetical order in documentation of
+ constructor parameters. [Eric Brine]
+
+ - Add documentation for configure_requires constructor parameter.
+ [Eric Brine]
+
+ - Change some of the docs' language describing relationship to
+ MakeMaker. [Ken Williams]
+
+ [OTHER]
+
+ - List Perl-Toolchain-Gang repo as official repo
+
0.39_01 - Thu Jul 21 16:48:48 EDT 2011
[BUG FIXES]
diff --git a/cpan/Module-Build/lib/Module/Build.pm b/cpan/Module-Build/lib/Module/Build.pm
index e1fc6cabb6..69fd77f0a3 100644
--- a/cpan/Module-Build/lib/Module/Build.pm
+++ b/cpan/Module-Build/lib/Module/Build.pm
@@ -16,7 +16,7 @@ use Module::Build::Base;
use vars qw($VERSION @ISA);
@ISA = qw(Module::Build::Base);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
@@ -967,24 +967,28 @@ platform you're installing on.
=item prefix
Provided for compatibility with C<ExtUtils::MakeMaker>'s PREFIX argument.
-C<prefix> should be used when you wish Module::Build to install your
-modules, documentation and scripts in the same place
-C<ExtUtils::MakeMaker> does.
+C<prefix> should be used when you want Module::Build to install your
+modules, documentation, and scripts in the same place as
+C<ExtUtils::MakeMaker>'s PREFIX mechanism.
The following are equivalent.
perl Build.PL --prefix /tmp/foo
perl Makefile.PL PREFIX=/tmp/foo
-Because of the very complex nature of the prefixification logic, the
+Because of the complex nature of the prefixification logic, the
behavior of PREFIX in C<MakeMaker> has changed subtly over time.
Module::Build's --prefix logic is equivalent to the PREFIX logic found
in C<ExtUtils::MakeMaker> 6.30.
-If you do not need to retain compatibility with C<ExtUtils::MakeMaker> or
+The maintainers of C<MakeMaker> do understand the troubles with the
+PREFIX mechanism, and added INSTALL_BASE support in version 6.31 of
+C<MakeMaker>, which was released in 2006.
+
+If you don't need to retain compatibility with old versions (pre-6.31) of C<ExtUtils::MakeMaker> or
are starting a fresh Perl installation we recommend you use
C<install_base> instead (and C<INSTALL_BASE> in C<ExtUtils::MakeMaker>).
-See L<Module::Build::Cookbook/Instaling in the same location as
+See L<Module::Build::Cookbook/Installing in the same location as
ExtUtils::MakeMaker> for further information.
@@ -1046,14 +1050,14 @@ perl.
It is risky to make major changes to C<MakeMaker>, since it does so many
things, is so important, and generally works. C<Module::Build> is an
entirely separate package so that I can work on it all I want, without
-worrying about backward compatibility.
+worrying about backward compatibility with C<MakeMaker>.
=item *
Finally, Perl is said to be a language for system administration.
Could it really be the case that Perl isn't up to the task of building
-and installing software? Even if that software is a bunch of stupid
-little C<.pm> files that just need to be copied from one place to
+and installing software? Even if that software is a bunch of
+C<.pm> files that just need to be copied from one place to
another? My sense was that we could design a system to accomplish
this in a flexible, extensible, and friendly manner. Or die trying.
@@ -1083,7 +1087,7 @@ Bug reports are also welcome at
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Module-Build>.
The latest development version is available from the Git
-repository at <https://github.com/dagolden/module-build/>
+repository at <https://github.com/Perl-Toolchain-Gang/Module-Build>
=head1 COPYRIGHT
diff --git a/cpan/Module-Build/lib/Module/Build/API.pod b/cpan/Module-Build/lib/Module/Build/API.pod
index 29d2f359c8..2760673d8a 100644
--- a/cpan/Module-Build/lib/Module/Build/API.pod
+++ b/cpan/Module-Build/lib/Module/Build/API.pod
@@ -157,6 +157,24 @@ checking on binary/packaged distributions of the module.
See the documentation for L<Module::Build::Authoring/"PREREQUISITES">
for the details of how requirements can be specified.
+=item configure_requires
+
+[version 0.30]
+
+Modules listed in this section must be installed I<before> configuring
+this distribution (i.e. before running the F<Build.PL> script).
+This might be a specific minimum version of C<Module::Build> or any
+other module the F<Build.PL> needs in order to do its stuff. Clients
+like C<CPAN.pm> or C<CPANPLUS> will be expected to pick
+C<configure_requires> out of the F<META.yml> file and install these
+items before running the C<Build.PL>.
+
+Module::Build may automatically add itself to configure_requires.
+See L</auto_configure_requires> for details.
+
+See the documentation for L<Module::Build::Authoring/"PREREQUISITES">
+for the details of how requirements can be specified.
+
=item create_packlist
[version 0.28]
@@ -834,6 +852,17 @@ SIGNATURE file to the MANIFEST (therefore, don't add it yourself).
The default value is false. In the future, the default may change to
true if you have C<Module::Signature> installed on your system.
+=item tap_harness_args
+
+[version 0.2808_03]
+
+An optional parameter specifying parameters to be passed to TAP::Harness when
+running tests. Must be given as a hash reference of parameters; see the
+L<TAP::Harness|TAP::Harness> documentation for details. Note that specifying
+this parameter will implicitly set C<use_tap_harness> to a true value. You
+must therefore be sure to add TAP::Harness as a requirement for your module in
+L</build_requires>.
+
=item test_files
[version 0.23]
@@ -862,17 +891,6 @@ therefore be sure to add TAP::Harness as a requirement for your module in
L</build_requires>. Implicitly set to a true value if C<tap_harness_args> is
specified.
-=item tap_harness_args
-
-[version 0.2808_03]
-
-An optional parameter specifying parameters to be passed to TAP::Harness when
-running tests. Must be given as a hash reference of parameters; see the
-L<TAP::Harness|TAP::Harness> documentation for details. Note that specifying
-this parameter will implicitly set C<use_tap_harness> to a true value. You
-must therefore be sure to add TAP::Harness as a requirement for your module in
-L</build_requires>.
-
=item xs_files
[version 0.19]
diff --git a/cpan/Module-Build/lib/Module/Build/Authoring.pod b/cpan/Module-Build/lib/Module/Build/Authoring.pod
index 92164df921..b1dc5843bf 100644
--- a/cpan/Module-Build/lib/Module/Build/Authoring.pod
+++ b/cpan/Module-Build/lib/Module/Build/Authoring.pod
@@ -304,7 +304,7 @@ Bug reports are also welcome at
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Module-Build>.
The latest development version is available from the Git
-repository at <https://github.com/dagolden/module-build/>
+repository at <https://github.com/Perl-Toolchain-Gang/Module-Build>
=head1 SEE ALSO
diff --git a/cpan/Module-Build/lib/Module/Build/Base.pm b/cpan/Module-Build/lib/Module/Build/Base.pm
index a29f500062..795ed91385 100644
--- a/cpan/Module-Build/lib/Module/Build/Base.pm
+++ b/cpan/Module-Build/lib/Module/Build/Base.pm
@@ -4,7 +4,7 @@ package Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
BEGIN { require 5.00503 }
@@ -38,7 +38,9 @@ sub new {
$self->check_manifest;
$self->auto_require;
- if ( $self->check_prereq + $self->check_autofeatures != 2) {
+
+ # All checks must run regardless if one fails, so no short circuiting!
+ if( grep { !$_ } $self->check_prereq, $self->check_autofeatures ) {
$self->log_warn(<<EOF);
ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
@@ -142,16 +144,16 @@ sub _construct {
my $config = delete $input{config} || {};
my $self = bless {
- args => {%$args},
- config => Module::Build::Config->new(values => $config),
- properties => {
- base_dir => $package->cwd,
- mb_version => $Module::Build::VERSION,
- %input,
- },
- phash => {},
- stash => {}, # temporary caching, not stored in _build
- }, $package;
+ args => {%$args},
+ config => Module::Build::Config->new(values => $config),
+ properties => {
+ base_dir => $package->cwd,
+ mb_version => $Module::Build::VERSION,
+ %input,
+ },
+ phash => {},
+ stash => {}, # temporary caching, not stored in _build
+ }, $package;
$self->_set_defaults;
my ($p, $ph) = ($self->{properties}, $self->{phash});
@@ -163,7 +165,7 @@ sub _construct {
if (exists $p->{$_}) {
my $vals = delete $p->{$_};
while (my ($k, $v) = each %$vals) {
- $self->$_($k, $v);
+ $self->$_($k, $v);
}
}
}
@@ -250,37 +252,37 @@ sub _default_install_paths {
$p->{install_sets} =
{
core => {
- lib => $c->get('installprivlib'),
- arch => $c->get('installarchlib'),
- bin => $c->get('installbin'),
- script => $c->get('installscript'),
- bindoc => $bindoc,
- libdoc => $libdoc,
- binhtml => $binhtml,
- libhtml => $libhtml,
- },
+ lib => $c->get('installprivlib'),
+ arch => $c->get('installarchlib'),
+ bin => $c->get('installbin'),
+ script => $c->get('installscript'),
+ bindoc => $bindoc,
+ libdoc => $libdoc,
+ binhtml => $binhtml,
+ libhtml => $libhtml,
+ },
site => {
- lib => $c->get('installsitelib'),
- arch => $c->get('installsitearch'),
- bin => $c->get('installsitebin') || $c->get('installbin'),
- script => $c->get('installsitescript') ||
- $c->get('installsitebin') || $c->get('installscript'),
- bindoc => $c->get('installsiteman1dir') || $bindoc,
- libdoc => $c->get('installsiteman3dir') || $libdoc,
- binhtml => $c->get('installsitehtml1dir') || $binhtml,
- libhtml => $c->get('installsitehtml3dir') || $libhtml,
- },
+ lib => $c->get('installsitelib'),
+ arch => $c->get('installsitearch'),
+ bin => $c->get('installsitebin') || $c->get('installbin'),
+ script => $c->get('installsitescript') ||
+ $c->get('installsitebin') || $c->get('installscript'),
+ bindoc => $c->get('installsiteman1dir') || $bindoc,
+ libdoc => $c->get('installsiteman3dir') || $libdoc,
+ binhtml => $c->get('installsitehtml1dir') || $binhtml,
+ libhtml => $c->get('installsitehtml3dir') || $libhtml,
+ },
vendor => {
- lib => $c->get('installvendorlib'),
- arch => $c->get('installvendorarch'),
- bin => $c->get('installvendorbin') || $c->get('installbin'),
- script => $c->get('installvendorscript') ||
- $c->get('installvendorbin') || $c->get('installscript'),
- bindoc => $c->get('installvendorman1dir') || $bindoc,
- libdoc => $c->get('installvendorman3dir') || $libdoc,
- binhtml => $c->get('installvendorhtml1dir') || $binhtml,
- libhtml => $c->get('installvendorhtml3dir') || $libhtml,
- },
+ lib => $c->get('installvendorlib'),
+ arch => $c->get('installvendorarch'),
+ bin => $c->get('installvendorbin') || $c->get('installbin'),
+ script => $c->get('installvendorscript') ||
+ $c->get('installvendorbin') || $c->get('installscript'),
+ bindoc => $c->get('installvendorman1dir') || $bindoc,
+ libdoc => $c->get('installvendorman3dir') || $libdoc,
+ binhtml => $c->get('installvendorhtml1dir') || $binhtml,
+ libhtml => $c->get('installvendorhtml3dir') || $libhtml,
+ },
};
$p->{original_prefix} =
@@ -311,35 +313,35 @@ sub _default_install_paths {
$p->{prefix_relpaths} =
{
core => {
- lib => [@libstyle],
- arch => [@libstyle, $version, $arch],
- bin => ['bin'],
- script => ['bin'],
- bindoc => ['man', 'man1'],
- libdoc => ['man', 'man3'],
- binhtml => ['html'],
- libhtml => ['html'],
- },
+ lib => [@libstyle],
+ arch => [@libstyle, $version, $arch],
+ bin => ['bin'],
+ script => ['bin'],
+ bindoc => ['man', 'man1'],
+ libdoc => ['man', 'man3'],
+ binhtml => ['html'],
+ libhtml => ['html'],
+ },
vendor => {
- lib => [@libstyle],
- arch => [@libstyle, $version, $arch],
- bin => ['bin'],
- script => ['bin'],
- bindoc => ['man', 'man1'],
- libdoc => ['man', 'man3'],
- binhtml => ['html'],
- libhtml => ['html'],
- },
+ lib => [@libstyle],
+ arch => [@libstyle, $version, $arch],
+ bin => ['bin'],
+ script => ['bin'],
+ bindoc => ['man', 'man1'],
+ libdoc => ['man', 'man3'],
+ binhtml => ['html'],
+ libhtml => ['html'],
+ },
site => {
- lib => [@libstyle, 'site_perl'],
- arch => [@libstyle, 'site_perl', $version, $arch],
- bin => ['bin'],
- script => ['bin'],
- bindoc => ['man', 'man1'],
- libdoc => ['man', 'man3'],
- binhtml => ['html'],
- libhtml => ['html'],
- },
+ lib => [@libstyle, 'site_perl'],
+ arch => [@libstyle, 'site_perl', $version, $arch],
+ bin => ['bin'],
+ script => ['bin'],
+ bindoc => ['man', 'man1'],
+ libdoc => ['man', 'man3'],
+ binhtml => ['html'],
+ libhtml => ['html'],
+ },
};
return $p
}
@@ -523,24 +525,24 @@ sub _discover_perl_interpreter {
# Adapted from IPC::Cmd::can_run()
sub find_command {
- my ($self, $command) = @_;
+ my ($self, $command) = @_;
- if( File::Spec->file_name_is_absolute($command) ) {
- return $self->_maybe_command($command);
+ if( File::Spec->file_name_is_absolute($command) ) {
+ return $self->_maybe_command($command);
- } else {
- for my $dir ( File::Spec->path ) {
- my $abs = File::Spec->catfile($dir, $command);
- return $abs if $abs = $self->_maybe_command($abs);
- }
+ } else {
+ for my $dir ( File::Spec->path ) {
+ my $abs = File::Spec->catfile($dir, $command);
+ return $abs if $abs = $self->_maybe_command($abs);
}
+ }
}
# Copied from ExtUtils::MM_Unix::maybe_command
sub _maybe_command {
- my($self,$file) = @_;
- return $file if -x $file && ! -d $file;
- return;
+ my($self,$file) = @_;
+ return $file if -x $file && ! -d $file;
+ return;
}
sub _is_interactive {
@@ -657,7 +659,7 @@ sub features {
while (my ($name, $info) = each %auto_features) {
my $failures = $self->prereq_failures($info);
my $disabled = grep( /^(?:\w+_)?(?:requires|conflicts)$/,
- keys %$failures ) ? 1 : 0;
+ keys %$failures ) ? 1 : 0;
$features{$name} = $disabled ? 0 : 1;
}
%features = (%features, $ph->{features}->access());
@@ -705,22 +707,22 @@ sub ACTION_config_data {
my $notes_pm = File::Spec->catfile($self->blib, 'lib', split /::/, "$notes_name.pm");
return if $self->up_to_date(['Build.PL',
- $self->config_file('config_data'),
- $self->config_file('features')
- ], $notes_pm);
+ $self->config_file('config_data'),
+ $self->config_file('features')
+ ], $notes_pm);
$self->log_verbose("Writing config notes to $notes_pm\n");
File::Path::mkpath(File::Basename::dirname($notes_pm));
Module::Build::Notes->write_config_data
- (
- file => $notes_pm,
- module => $module_name,
- config_module => $notes_name,
- config_data => scalar $self->config_data,
- feature => scalar $self->{phash}{features}->access(),
- auto_features => scalar $self->auto_features,
- );
+ (
+ file => $notes_pm,
+ module => $module_name,
+ config_module => $notes_name,
+ config_data => scalar $self->config_data,
+ feature => scalar $self->{phash}{features}->access(),
+ auto_features => scalar $self->auto_features,
+ );
}
########################################################################
@@ -1173,7 +1175,7 @@ sub dist_version_from {
my $p = $self->{properties};
if ($self->module_name) {
$p->{dist_version_from} ||=
- join( '/', 'lib', split(/::/, $self->module_name) ) . '.pm';
+ join( '/', 'lib', split(/::/, $self->module_name) ) . '.pm';
}
return $p->{dist_version_from} || undef;
}
@@ -1557,17 +1559,17 @@ sub prereq_failures {
my $status = $self->check_installed_status($modname, $spec);
if ($type =~ /^(?:\w+_)?conflicts$/) {
- next if !$status->{ok};
- $status->{conflicts} = delete $status->{need};
- $status->{message} = "$modname ($status->{have}) conflicts with this distribution";
+ next if !$status->{ok};
+ $status->{conflicts} = delete $status->{need};
+ $status->{message} = "$modname ($status->{have}) conflicts with this distribution";
} elsif ($type =~ /^(?:\w+_)?recommends$/) {
- next if $status->{ok};
- $status->{message} = (!ref($status->{have}) && $status->{have} eq '<none>'
- ? "$modname is not installed"
- : "$modname ($status->{have}) is installed, but we prefer to have $spec");
+ next if $status->{ok};
+ $status->{message} = (!ref($status->{have}) && $status->{have} eq '<none>'
+ ? "$modname is not installed"
+ : "$modname ($status->{have}) is installed, but we prefer to have $spec");
} else {
- next if $status->{ok};
+ next if $status->{ok};
}
$out->{$type}{$modname} = $status;
@@ -1986,8 +1988,8 @@ sub check_manifest {
$self->log_verbose("Checking whether your kit is complete...\n");
if (my @missed = ExtUtils::Manifest::manicheck()) {
$self->log_warn("WARNING: the following files are missing in your kit:\n",
- "\t", join("\n\t", @missed), "\n",
- "Please inform the author.\n\n");
+ "\t", join("\n\t", @missed), "\n",
+ "Please inform the author.\n\n");
} else {
$self->log_verbose("Looks good\n\n");
}
@@ -2077,8 +2079,8 @@ sub unparse_args {
my @out;
while (my ($k, $v) = each %$args) {
push @out, (UNIVERSAL::isa($v, 'HASH') ? map {+"--$k", "$_=$v->{$_}"} keys %$v :
- UNIVERSAL::isa($v, 'ARRAY') ? map {+"--$k", $_} @$v :
- ("--$k", $v));
+ UNIVERSAL::isa($v, 'ARRAY') ? map {+"--$k", $_} @$v :
+ ("--$k", $v));
}
return @out;
}
@@ -2119,12 +2121,14 @@ sub _translate_option {
return $opt;
}
+my %singular_argument = map { ($_ => 1) } qw/install_base prefix destdir installdir verbose quiet uninst debug sign/;
+
sub _read_arg {
my ($self, $args, $key, $val) = @_;
$key = $self->_translate_option($key);
- if ( exists $args->{$key} ) {
+ if ( exists $args->{$key} and not $singular_argument{$key} ) {
$args->{$key} = [ $args->{$key} ] unless ref $args->{$key};
push @{$args->{$key}}, $val;
} else {
@@ -2215,7 +2219,7 @@ sub read_args {
$args{$_} = [ $args{$_} ] unless ref $args{$_};
foreach my $arg ( @{$args{$_}} ) {
$arg =~ /($opt_re)=(.*)/
- or die "Malformed '$_' argument: '$arg' should be something like 'foo=bar'";
+ or die "Malformed '$_' argument: '$arg' should be something like 'foo=bar'";
$hash{$1} = $2;
}
$args{$_} = \%hash;
@@ -2234,10 +2238,10 @@ sub read_args {
next if !defined $args{$key}{$subkey};
my $subkey_ext = $self->_detildefy($args{$key}{$subkey});
if ( $subkey eq 'html' ) { # translate for compatibility
- $args{$key}{binhtml} = $subkey_ext;
- $args{$key}{libhtml} = $subkey_ext;
+ $args{$key}{binhtml} = $subkey_ext;
+ $args{$key}{libhtml} = $subkey_ext;
} else {
- $args{$key}{$subkey} = $subkey_ext;
+ $args{$key}{$subkey} = $subkey_ext;
}
}
}
@@ -2267,8 +2271,8 @@ sub _merge_arglist {
if ( exists( $opts1->{$key} ) ) {
if ( ref( $val ) eq 'HASH' ) {
while (my ($k, $v) = each %$val) {
- $new_opts{$key}{$k} = $v unless exists( $opts1->{$key}{$k} );
- }
+ $new_opts{$key}{$k} = $v unless exists( $opts1->{$key}{$k} );
+ }
}
} else {
$new_opts{$key} = $val
@@ -2318,8 +2322,8 @@ sub read_modulebuildrc {
$modulebuildrc = $ENV{MODULEBUILDRC};
} elsif ( exists($ENV{MODULEBUILDRC}) ) {
$self->log_warn("WARNING: Can't find resource file " .
- "'$ENV{MODULEBUILDRC}' defined in environment.\n" .
- "No options loaded\n");
+ "'$ENV{MODULEBUILDRC}' defined in environment.\n" .
+ "No options loaded\n");
return ();
} else {
$modulebuildrc = $self->_find_user_config( '.modulebuildrc' );
@@ -2337,9 +2341,9 @@ sub read_modulebuildrc {
if ( $line =~ /^\S/ ) {
if ( $buffer ) {
- my( $action, $options ) = split( /\s+/, $buffer, 2 );
- $options{$action} .= $options . ' ';
- $buffer = '';
+ my( $action, $options ) = split( /\s+/, $buffer, 2 );
+ $options{$action} .= $options . ' ';
+ $buffer = '';
}
$buffer = $line;
} else {
@@ -2394,9 +2398,9 @@ sub merge_args {
$self->{args} ;
if ($additive{$key}) {
- $add_to->{$_} = $val->{$_} foreach keys %$val;
+ $add_to->{$_} = $val->{$_} foreach keys %$val;
} else {
- $add_to->{$key} = $val;
+ $add_to->{$key} = $val;
}
}
}
@@ -2687,7 +2691,7 @@ sub generic_test {
# Make sure we test the module in blib/
unshift @INC, (File::Spec->catdir($p->{base_dir}, $self->blib, 'lib'),
- File::Spec->catdir($p->{base_dir}, $self->blib, 'arch'));
+ File::Spec->catdir($p->{base_dir}, $self->blib, 'arch'));
# Filter out nonsensical @INC entries - some versions of
# Test::Harness will really explode the number of entries here
@@ -2825,7 +2829,7 @@ sub ACTION_testcover {
$self->do_system(qw(cover -delete))
unless $self->up_to_date($pm_files, $cover_files)
- && $self->up_to_date($self->test_files, $cover_files);
+ && $self->up_to_date($self->test_files, $cover_files);
}
local $Test::Harness::switches =
@@ -2996,14 +3000,14 @@ sub find_PL_files {
if (UNIVERSAL::isa($files, 'ARRAY')) {
return { map {$_, [/^(.*)\.PL$/]}
- map $self->localize_file_path($_),
- @$files };
+ map $self->localize_file_path($_),
+ @$files };
} elsif (UNIVERSAL::isa($files, 'HASH')) {
my %out;
while (my ($file, $to) = each %$files) {
- $out{ $self->localize_file_path($file) } = [ map $self->localize_file_path($_),
- ref $to ? @$to : ($to) ];
+ $out{ $self->localize_file_path($file) } = [ map $self->localize_file_path($_),
+ ref $to ? @$to : ($to) ];
}
return \%out;
@@ -3042,8 +3046,8 @@ sub find_test_files {
if (my $files = $p->{test_files}) {
$files = [keys %$files] if UNIVERSAL::isa($files, 'HASH');
$files = [map { -d $_ ? $self->expand_test_dir($_) : $_ }
- map glob,
- $self->split_like_shell($files)];
+ map glob,
+ $self->split_like_shell($files)];
# Always given as a Unix file spec.
return [ map $self->localize_file_path($_), @$files ];
@@ -3067,9 +3071,9 @@ sub _find_file_by_type {
return {} unless -d $dir;
return { map {$_, $_}
- map $self->localize_file_path($_),
- grep !/\.\#/,
- @{ $self->rscan_dir($dir, $self->file_qr("\\.$type\$")) } };
+ map $self->localize_file_path($_),
+ grep !/\.\#/,
+ @{ $self->rscan_dir($dir, $self->file_qr("\\.$type\$")) } };
}
sub localize_file_path {
@@ -3192,8 +3196,8 @@ sub _is_default_installable {
my $type = shift;
return ( $self->install_destination($type) &&
( $self->install_path($type) ||
- $self->install_sets($self->installdirs)->{$type} )
- ) ? 1 : 0;
+ $self->install_sets($self->installdirs)->{$type} )
+ ) ? 1 : 0;
}
sub _is_ActivePerl {
@@ -3248,7 +3252,7 @@ sub manify_bin_pods {
# This is expected to change in a future version (Pod::Simple > 3.03).
my $parser = Pod::Man->new( section => 1 ); # binaries go in section 1
my $manpage = $self->man1page_name( $file ) . '.' .
- $self->config( 'man1ext' );
+ $self->config( 'man1ext' );
my $outfile = File::Spec->catfile($mandir, $manpage);
next if $self->up_to_date( $file, $outfile );
$self->log_verbose("Manifying $file -> $outfile\n");
@@ -3273,7 +3277,7 @@ sub manify_lib_pods {
# This is expected to change in a future version (Pod::Simple > 3.03).
my $parser = Pod::Man->new( section => 3 ); # libraries go in section 3
my $manpage = $self->man3page_name( $relfile ) . '.' .
- $self->config( 'man3ext' );
+ $self->config( 'man3ext' );
my $outfile = File::Spec->catfile( $mandir, $manpage);
next if $self->up_to_date( $file, $outfile );
$self->log_verbose("Manifying $file -> $outfile\n");
@@ -3292,7 +3296,7 @@ sub _find_pods {
FILE: foreach my $file ( @{ $self->rscan_dir( $dir ) } ) {
foreach my $regexp ( @{ $args{exclude} } ) {
- next FILE if $file =~ $regexp;
+ next FILE if $file =~ $regexp;
}
$files{$file} = File::Spec->abs2rel($file, $dir) if $self->contains_pod( $file )
}
@@ -3542,8 +3546,8 @@ sub ACTION_diff {
my $installed = Module::Build::ModuleInfo->find_module_by_name(
join('::', @parts), \@myINC );
if (not $installed) {
- print "Only in lib: $file\n";
- next;
+ print "Only in lib: $file\n";
+ next;
}
my $status = File::Compare::compare($installed, $file);
@@ -3551,9 +3555,9 @@ sub ACTION_diff {
die "Can't compare $installed and $file: $!" if $status == -1;
if ($file =~ $text_suffix) {
- $self->do_system('diff', @flags, $installed, $file);
+ $self->do_system('diff', @flags, $installed, $file);
} else {
- print "Binary files $file and $installed differ\n";
+ print "Binary files $file and $installed differ\n";
}
}
}
@@ -3742,12 +3746,12 @@ sub ACTION_ppmdist {
foreach my $file ( @$files ) {
next unless -f $file;
my $rel_file =
- File::Spec->abs2rel( File::Spec->rel2abs( $file ),
- File::Spec->rel2abs( $dir ) );
+ File::Spec->abs2rel( File::Spec->rel2abs( $file ),
+ File::Spec->rel2abs( $dir ) );
my $to_file =
- File::Spec->catfile( $ppm, 'blib',
- exists( $types{$type} ) ? $types{$type} : $type,
- $rel_file );
+ File::Spec->catfile( $ppm, 'blib',
+ exists( $types{$type} ) ? $types{$type} : $type,
+ $rel_file );
$self->copy_if_modified( from => $file, to => $to_file );
}
}
@@ -3996,14 +4000,14 @@ EOF
my $old_parse_file;
$old_parse_file = \&{"Pod::Simple::parse_file"}
- and
+ and
local *{"Pod::Simple::parse_file"} = sub {
- my $self = shift;
- $self->output_fh($_[1]) if $_[1];
- $self->$old_parse_file($_[0]);
+ my $self = shift;
+ $self->output_fh($_[1]) if $_[1];
+ $self->$old_parse_file($_[0]);
}
if $Pod::Text::VERSION
- == 3.01; # Split line to avoid evil version-finder
+ == 3.01; # Split line to avoid evil version-finder
Pod::Text::pod2text( $docfile, $fh );
@@ -4083,14 +4087,14 @@ sub ACTION_disttest {
$self->_do_in_dir
( $self->dist_dir,
sub {
- # XXX could be different names for scripts
-
- $self->run_perl_script('Build.PL') # XXX Should this be run w/ --nouse-rcfile
- or die "Error executing 'Build.PL' in dist directory: $!";
- $self->run_perl_script('Build')
- or die "Error executing 'Build' in dist directory: $!";
- $self->run_perl_script('Build', [], ['test'])
- or die "Error executing 'Build test' in dist directory";
+ # XXX could be different names for scripts
+
+ $self->run_perl_script('Build.PL') # XXX Should this be run w/ --nouse-rcfile
+ or die "Error executing 'Build.PL' in dist directory: $!";
+ $self->run_perl_script('Build')
+ or die "Error executing 'Build' in dist directory: $!";
+ $self->run_perl_script('Build', [], ['test'])
+ or die "Error executing 'Build test' in dist directory";
});
}
@@ -4729,7 +4733,7 @@ sub prepare_metadata {
my $pkgs = eval { $self->find_dist_packages };
if ($@) {
$self->log_warn("$@\nWARNING: Possible missing or corrupt 'MANIFEST' file.\n" .
- "Nothing to enter for 'provides' field in metafile.\n");
+ "Nothing to enter for 'provides' field in metafile.\n");
} else {
$node->{provides} = $pkgs if %$pkgs;
}
@@ -4741,9 +4745,9 @@ sub prepare_metadata {
$add_node->('generated_by', "Module::Build version $Module::Build::VERSION");
$add_node->('meta-spec',
- {version => '1.4',
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
- });
+ {version => '1.4',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ });
while (my($k, $v) = each %{$self->meta_add}) {
$add_node->($k, $v);
@@ -4834,42 +4838,42 @@ sub find_packages_in_files {
if ( exists( $prime{$package} ) ) { # primary package selected
if ( $result->{err} ) {
- # Use the selected primary package, but there are conflicting
- # errors among multiple alternative packages that need to be
- # reported
+ # Use the selected primary package, but there are conflicting
+ # errors among multiple alternative packages that need to be
+ # reported
$self->log_warn(
- "Found conflicting versions for package '$package'\n" .
- " $prime{$package}{file} ($prime{$package}{version})\n" .
- $result->{err}
+ "Found conflicting versions for package '$package'\n" .
+ " $prime{$package}{file} ($prime{$package}{version})\n" .
+ $result->{err}
);
} elsif ( defined( $result->{version} ) ) {
- # There is a primary package selected, and exactly one
- # alternative package
-
- if ( exists( $prime{$package}{version} ) &&
- defined( $prime{$package}{version} ) ) {
- # Unless the version of the primary package agrees with the
- # version of the alternative package, report a conflict
- if ( $self->compare_versions( $prime{$package}{version}, '!=',
- $result->{version} ) ) {
+ # There is a primary package selected, and exactly one
+ # alternative package
+
+ if ( exists( $prime{$package}{version} ) &&
+ defined( $prime{$package}{version} ) ) {
+ # Unless the version of the primary package agrees with the
+ # version of the alternative package, report a conflict
+ if ( $self->compare_versions( $prime{$package}{version}, '!=',
+ $result->{version} ) ) {
$self->log_warn(
"Found conflicting versions for package '$package'\n" .
- " $prime{$package}{file} ($prime{$package}{version})\n" .
- " $result->{file} ($result->{version})\n"
+ " $prime{$package}{file} ($prime{$package}{version})\n" .
+ " $result->{file} ($result->{version})\n"
);
- }
+ }
- } else {
- # The prime package selected has no version so, we choose to
- # use any alternative package that does have a version
- $prime{$package}{file} = $result->{file};
- $prime{$package}{version} = $result->{version};
- }
+ } else {
+ # The prime package selected has no version so, we choose to
+ # use any alternative package that does have a version
+ $prime{$package}{file} = $result->{file};
+ $prime{$package}{version} = $result->{version};
+ }
} else {
- # no alt package found with a version, but we have a prime
- # package so we use it whether it has a version or not
+ # no alt package found with a version, but we have a prime
+ # package so we use it whether it has a version or not
}
} else { # No primary package was selected, use the best alternative
@@ -4877,7 +4881,7 @@ sub find_packages_in_files {
if ( $result->{err} ) {
$self->log_warn(
"Found conflicting versions for package '$package'\n" .
- $result->{err}
+ $result->{err}
);
}
@@ -4885,14 +4889,18 @@ sub find_packages_in_files {
# something rather than nothing
$prime{$package}{file} = $result->{file};
$prime{$package}{version} = $result->{version}
- if defined( $result->{version} );
+ if defined( $result->{version} );
}
}
- # Normalize versions. Can't use exists() here because of bug in YAML::Node.
- # XXX "bug in YAML::Node" comment seems irrelvant -- dagolden, 2009-05-18
- for (grep defined $_->{version}, values %prime) {
- $_->{version} = $self->normalize_version( $_->{version} );
+ # Normalize versions or delete them if undef/0
+ for my $provides ( values %prime ) {
+ if ( $provides->{version} ) {
+ $provides->{version} = $self->normalize_version( $provides->{version} )
+ }
+ else {
+ delete $provides->{version};
+ }
}
return \%prime;
@@ -4910,16 +4918,16 @@ sub _resolve_module_versions {
my $err = '';
foreach my $p ( @$packages ) {
if ( defined( $p->{version} ) ) {
- if ( defined( $version ) ) {
- if ( $self->compare_versions( $version, '!=', $p->{version} ) ) {
- $err .= " $p->{file} ($p->{version})\n";
- } else {
- # same version declared multiple times, ignore
- }
- } else {
- $file = $p->{file};
- $version = $p->{version};
- }
+ if ( defined( $version ) ) {
+ if ( $self->compare_versions( $version, '!=', $p->{version} ) ) {
+ $err .= " $p->{file} ($p->{version})\n";
+ } else {
+ # same version declared multiple times, ignore
+ }
+ } else {
+ $file = $p->{file};
+ $version = $p->{version};
+ }
}
$file ||= $p->{file} if defined( $p->{file} );
}
@@ -5106,9 +5114,9 @@ sub prefix_relative {
my $relpath = $self->install_sets($installdirs)->{$type};
return $self->_prefixify($relpath,
- $self->original_prefix($installdirs),
- $type,
- );
+ $self->original_prefix($installdirs),
+ $type,
+ );
}
# Translated from ExtUtils::MM_Unix::prefixify()
@@ -5262,8 +5270,8 @@ sub rscan_dir {
local $_; # find() can overwrite $_, so protect ourselves
my $subr = !$pattern ? sub {push @result, $File::Find::name} :
!ref($pattern) || (ref $pattern eq 'Regexp') ? sub {push @result, $File::Find::name if /$pattern/} :
- ref($pattern) eq 'CODE' ? sub {push @result, $File::Find::name if $pattern->()} :
- die "Unknown pattern type";
+ ref($pattern) eq 'CODE' ? sub {push @result, $File::Find::name if $pattern->()} :
+ die "Unknown pattern type";
File::Find::find({wanted => $subr, no_chdir => 1}, $dir);
return \@result;
@@ -5329,11 +5337,11 @@ sub compile_c {
return $obj_file if $self->up_to_date($file, $obj_file);
$b->compile(source => $file,
- defines => $args{defines},
- object_file => $obj_file,
- include_dirs => $self->include_dirs,
- extra_compiler_flags => $self->extra_compiler_flags,
- );
+ defines => $args{defines},
+ object_file => $obj_file,
+ include_dirs => $self->include_dirs,
+ extra_compiler_flags => $self->extra_compiler_flags,
+ );
return $obj_file;
}
@@ -5348,7 +5356,7 @@ sub link_c {
return $spec->{lib_file}
if $self->up_to_date([$spec->{obj_file}, @$objects],
- $spec->{lib_file});
+ $spec->{lib_file});
my $module_name = $spec->{module_name} || $self->module_name;
@@ -5369,10 +5377,10 @@ sub compile_xs {
if (eval {require ExtUtils::ParseXS; 1}) {
ExtUtils::ParseXS::process_file(
- filename => $file,
- prototypes => 0,
- output => $args{outfile},
- );
+ filename => $file,
+ prototypes => 0,
+ output => $args{outfile},
+ );
} else {
# Ok, I give up. Just use backticks.
@@ -5393,7 +5401,7 @@ sub compile_xs {
my $perl = $self->{properties}{perl};
my @command = ($perl, "-I".$cf->get('installarchlib'), "-I".$cf->get('installprivlib'), $xsubpp, '-noprototypes',
- @typemaps, $file);
+ @typemaps, $file);
$self->log_info("@command\n");
my $fh = IO::File->new("> $args{outfile}") or die "Couldn't write $args{outfile}: $!";
@@ -5480,18 +5488,18 @@ sub _infer_xs_spec {
$spec{module_name} = join( '::', (@d, $file_base) );
$spec{archdir} = File::Spec->catdir($self->blib, 'arch', 'auto',
- @d, $file_base);
+ @d, $file_base);
$spec{bs_file} = File::Spec->catfile($spec{archdir}, "${file_base}.bs");
$spec{lib_file} = File::Spec->catfile($spec{archdir},
- "${file_base}.".$cf->get('dlext'));
+ "${file_base}.".$cf->get('dlext'));
$spec{c_file} = File::Spec->catfile( $spec{src_dir},
- "${file_base}.c" );
+ "${file_base}.c" );
$spec{obj_file} = File::Spec->catfile( $spec{src_dir},
- "${file_base}".$cf->get('obj_ext') );
+ "${file_base}".$cf->get('obj_ext') );
return \%spec;
}
@@ -5514,7 +5522,7 @@ sub process_xs {
# .c -> .o
my $v = $self->dist_version;
$self->compile_c($spec->{c_file},
- defines => {VERSION => qq{"$v"}, XS_VERSION => qq{"$v"}});
+ defines => {VERSION => qq{"$v"}, XS_VERSION => qq{"$v"}});
# archdir
File::Path::mkpath($spec->{archdir}, 0, oct(777)) unless -d $spec->{archdir};
@@ -5559,9 +5567,9 @@ sub do_system {
sub copy_if_modified {
my $self = shift;
my %args = (@_ > 3
- ? ( @_ )
- : ( from => shift, to_dir => shift, flatten => shift )
- );
+ ? ( @_ )
+ : ( from => shift, to_dir => shift, flatten => shift )
+ );
$args{verbose} = !$self->quiet
unless exists $args{verbose};
@@ -5578,8 +5586,8 @@ sub copy_if_modified {
$to_path = $args{to};
} elsif (defined $args{to_dir} and length $args{to_dir}) {
$to_path = File::Spec->catfile( $args{to_dir}, $args{flatten}
- ? File::Basename::basename($file)
- : $file );
+ ? File::Basename::basename($file)
+ : $file );
} else {
die "No 'to' or 'to_dir' parameter given to copy_if_modified";
}
@@ -5645,8 +5653,8 @@ sub dir_contains {
return 0 if @second_dirs < @first_dirs;
my $is_same = ( $self->_case_tolerant
- ? sub {lc(shift()) eq lc(shift())}
- : sub {shift() eq shift()} );
+ ? sub {lc(shift()) eq lc(shift())}
+ : sub {shift() eq shift()} );
while (@first_dirs) {
return 0 unless $is_same->(shift @first_dirs, shift @second_dirs);
diff --git a/cpan/Module-Build/lib/Module/Build/Compat.pm b/cpan/Module-Build/lib/Module/Build/Compat.pm
index 452dfb96ad..dc8ad70c96 100644
--- a/cpan/Module-Build/lib/Module/Build/Compat.pm
+++ b/cpan/Module-Build/lib/Module/Build/Compat.pm
@@ -2,7 +2,7 @@ package Module::Build::Compat;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
use File::Basename ();
use File::Spec;
diff --git a/cpan/Module-Build/lib/Module/Build/Config.pm b/cpan/Module-Build/lib/Module/Build/Config.pm
index 9f3dc6779e..d65f28e8ec 100644
--- a/cpan/Module-Build/lib/Module/Build/Config.pm
+++ b/cpan/Module-Build/lib/Module/Build/Config.pm
@@ -2,7 +2,7 @@ package Module::Build::Config;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Config;
diff --git a/cpan/Module-Build/lib/Module/Build/Cookbook.pm b/cpan/Module-Build/lib/Module/Build/Cookbook.pm
index 80af7c4c0d..e318a65519 100644
--- a/cpan/Module-Build/lib/Module/Build/Cookbook.pm
+++ b/cpan/Module-Build/lib/Module/Build/Cookbook.pm
@@ -1,7 +1,7 @@
package Module::Build::Cookbook;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
=head1 NAME
diff --git a/cpan/Module-Build/lib/Module/Build/Dumper.pm b/cpan/Module-Build/lib/Module/Build/Dumper.pm
index 8191410460..8c2a211d90 100644
--- a/cpan/Module-Build/lib/Module/Build/Dumper.pm
+++ b/cpan/Module-Build/lib/Module/Build/Dumper.pm
@@ -1,7 +1,7 @@
package Module::Build::Dumper;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
# This is just a split-out of a wrapper function to do Data::Dumper
# stuff "the right way". See:
diff --git a/cpan/Module-Build/lib/Module/Build/ModuleInfo.pm b/cpan/Module-Build/lib/Module/Build/ModuleInfo.pm
index a4c66853e8..53bd82e986 100644
--- a/cpan/Module-Build/lib/Module/Build/ModuleInfo.pm
+++ b/cpan/Module-Build/lib/Module/Build/ModuleInfo.pm
@@ -4,7 +4,7 @@ package Module::Build::ModuleInfo;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
require Module::Metadata;
diff --git a/cpan/Module-Build/lib/Module/Build/Notes.pm b/cpan/Module-Build/lib/Module/Build/Notes.pm
index 9a80a59430..c7611b6255 100644
--- a/cpan/Module-Build/lib/Module/Build/Notes.pm
+++ b/cpan/Module-Build/lib/Module/Build/Notes.pm
@@ -4,7 +4,7 @@ package Module::Build::Notes;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Data::Dumper;
use IO::File;
diff --git a/cpan/Module-Build/lib/Module/Build/PPMMaker.pm b/cpan/Module-Build/lib/Module/Build/PPMMaker.pm
index 62e8b0408c..c0d6c339a1 100644
--- a/cpan/Module-Build/lib/Module/Build/PPMMaker.pm
+++ b/cpan/Module-Build/lib/Module/Build/PPMMaker.pm
@@ -5,7 +5,7 @@ use Config;
use vars qw($VERSION);
use IO::File;
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
# This code is mostly borrowed from ExtUtils::MM_Unix 6.10_03, with a
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/Amiga.pm b/cpan/Module-Build/lib/Module/Build/Platform/Amiga.pm
index e088c84833..c83eee719c 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/Amiga.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/Amiga.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::Amiga;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/Default.pm b/cpan/Module-Build/lib/Module/Build/Platform/Default.pm
index 8669036ab3..2a770ddce4 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/Default.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/Default.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::Default;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/EBCDIC.pm b/cpan/Module-Build/lib/Module/Build/Platform/EBCDIC.pm
index 0cd526448b..ef691ec644 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/EBCDIC.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/EBCDIC.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::EBCDIC;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/MPEiX.pm b/cpan/Module-Build/lib/Module/Build/Platform/MPEiX.pm
index 21c757b317..681e108a41 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/MPEiX.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/MPEiX.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::MPEiX;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/MacOS.pm b/cpan/Module-Build/lib/Module/Build/Platform/MacOS.pm
index 3f49c8288a..2f1034c633 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/MacOS.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/MacOS.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::MacOS;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Base;
use vars qw(@ISA);
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/RiscOS.pm b/cpan/Module-Build/lib/Module/Build/Platform/RiscOS.pm
index 4717481fb8..75a3c78911 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/RiscOS.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/RiscOS.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::RiscOS;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/Unix.pm b/cpan/Module-Build/lib/Module/Build/Platform/Unix.pm
index 611c2cf8d3..2f34385d37 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/Unix.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/Unix.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::Unix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/VMS.pm b/cpan/Module-Build/lib/Module/Build/Platform/VMS.pm
index 4842e6cbde..b253934d35 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/VMS.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/VMS.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::VMS;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Base;
use Config;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/VOS.pm b/cpan/Module-Build/lib/Module/Build/Platform/VOS.pm
index bec44da6af..e9cf5eee7e 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/VOS.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/VOS.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::VOS;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/Windows.pm b/cpan/Module-Build/lib/Module/Build/Platform/Windows.pm
index 5094c41629..b117019875 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/Windows.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/Windows.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::Windows;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Config;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/aix.pm b/cpan/Module-Build/lib/Module/Build/Platform/aix.pm
index cd4cf24ceb..9472aaba81 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/aix.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/aix.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::aix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/cygwin.pm b/cpan/Module-Build/lib/Module/Build/Platform/cygwin.pm
index 2ecd9ae556..51a97538f8 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/cygwin.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/cygwin.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::cygwin;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/darwin.pm b/cpan/Module-Build/lib/Module/Build/Platform/darwin.pm
index e7d256a839..1e3b09489e 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/darwin.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/darwin.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::darwin;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
diff --git a/cpan/Module-Build/lib/Module/Build/Platform/os2.pm b/cpan/Module-Build/lib/Module/Build/Platform/os2.pm
index d9436713ba..abe402e3c1 100644
--- a/cpan/Module-Build/lib/Module/Build/Platform/os2.pm
+++ b/cpan/Module-Build/lib/Module/Build/Platform/os2.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::os2;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
diff --git a/cpan/Module-Build/lib/Module/Build/PodParser.pm b/cpan/Module-Build/lib/Module/Build/PodParser.pm
index 8230192056..456f8deaa0 100644
--- a/cpan/Module-Build/lib/Module/Build/PodParser.pm
+++ b/cpan/Module-Build/lib/Module/Build/PodParser.pm
@@ -2,7 +2,7 @@ package Module::Build::PodParser;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use vars qw(@ISA);
@@ -28,7 +28,7 @@ sub parse_from_filehandle {
local $_;
while (<$fh>) {
next unless /^=(?!cut)/ .. /^=cut/; # in POD
- last if ($self->{abstract}) = /^ (?: [a-z:]+ \s+ - \s+ ) (.*\S) /ix;
+ last if ($self->{abstract}) = /^ (?: [a-z0-9:]+ \s+ - \s+ ) (.*\S) /ix;
}
my @author;
diff --git a/cpan/Module-Build/lib/inc/latest.pm b/cpan/Module-Build/lib/inc/latest.pm
index c83167197b..8c53ea8550 100644
--- a/cpan/Module-Build/lib/inc/latest.pm
+++ b/cpan/Module-Build/lib/inc/latest.pm
@@ -1,7 +1,7 @@
package inc::latest;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use Carp;
diff --git a/cpan/Module-Build/lib/inc/latest/private.pm b/cpan/Module-Build/lib/inc/latest/private.pm
index 9e4d5d7b56..cf7a718feb 100644
--- a/cpan/Module-Build/lib/inc/latest/private.pm
+++ b/cpan/Module-Build/lib/inc/latest/private.pm
@@ -1,7 +1,7 @@
package inc::latest::private;
use strict;
use vars qw($VERSION);
-$VERSION = '0.39_01';
+$VERSION = '0.40';
$VERSION = eval $VERSION;
use File::Spec;
diff --git a/cpan/Module-Build/t/install.t b/cpan/Module-Build/t/install.t
index ffe8afca01..2d487f679b 100644
--- a/cpan/Module-Build/t/install.t
+++ b/cpan/Module-Build/t/install.t
@@ -2,7 +2,7 @@
use strict;
use lib 't/lib';
-use MBTest tests => 34;
+use MBTest tests => 35;
blib_load('Module::Build');
@@ -166,6 +166,10 @@ is $@, '';
'--install_base', $basedir])};
is $@, '';
+ eval {$mb->run_perl_script($cmd, [], ['install', '--destdir', $destdir,
+ '--install_base', $basedir, '--install_base', $basedir])};
+ is $@, '';
+
$install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm';
is -e $install_to, 1, "Look for file at $install_to";
diff --git a/cpan/Module-Build/t/metadata.t b/cpan/Module-Build/t/metadata.t
index a495f157b4..4401e1a62d 100644
--- a/cpan/Module-Build/t/metadata.t
+++ b/cpan/Module-Build/t/metadata.t
@@ -2,7 +2,7 @@
use strict;
use lib 't/lib';
-use MBTest tests => 52;
+use MBTest tests => 53;
blib_load('Module::Build');
blib_load('Module::Build::ConfigData');
@@ -296,7 +296,20 @@ is_deeply($provides,
version => '1.23' }}); # XXX should be 2.34?
like( $err, qr/already declared/, ' with conflicting versions reported' );
+# Missing version should not show up in provides as version "0"
+$dist->change_file( 'lib/Simple.pm', <<'---' );
+package Foo;
+$VERSION = undef;
+1;
+---
+$dist->regen( clean => 1 );
+$err = stderr_of( sub { $mb = new_build() } );
+$err = stderr_of( sub { $provides = $mb->find_dist_packages } );
+is_deeply($provides,
+ {'Foo' => { file => $simple_file } },
+ "undef \$VERSION is omitted from 'provides'"
+);
############################## Multiple Modules
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 40a1f425d7..cbc628459d 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -99,6 +99,10 @@ XXX
L<XXX> has been upgraded from version 0.69 to version 0.70.
+=item *
+
+L<Module::Build> has been upgraded from version 0.39_01 to version 0.40.
+
=back
=head2 Removed Modules and Pragmata