summaryrefslogtreecommitdiff
path: root/lib/Module
diff options
context:
space:
mode:
authorDavid Golden <dagolden@cpan.org>2009-07-26 22:58:56 -0400
committerDavid Golden <dagolden@cpan.org>2009-07-26 23:17:06 -0400
commit4085a377252e8493c61e9548893d25030c462b89 (patch)
treecdc9a949ef6ef0c7cb84f0a4a3bff90b016802ff /lib/Module
parent89f530a6b8371ad5f6cfa4a07a2a5d27e42a388e (diff)
downloadperl-4085a377252e8493c61e9548893d25030c462b89.tar.gz
Update Module::Build to 0.34_02
0.34_02 - Sun Jul 26 22:50:40 EDT 2009 Bug-fixes: - Bundled Module::Build::Version updated to bring into sync with CPAN version.pm 0.77 0.34_01 - Sat Jul 18 16:32:09 EDT 2009 Enhancements: - Added --debug flag to trace Build action execution (RT#47933) [David Golden] Bug-fixes: - Bundled Module::Build::Version version code updated to fix unsafe use of $@ (RT#47980) [John Peacock]
Diffstat (limited to 'lib/Module')
-rw-r--r--lib/Module/Build.pm7
-rw-r--r--lib/Module/Build/API.pod2
-rw-r--r--lib/Module/Build/Base.pm14
-rw-r--r--lib/Module/Build/Changes16
-rw-r--r--lib/Module/Build/Compat.pm2
-rw-r--r--lib/Module/Build/Config.pm2
-rw-r--r--lib/Module/Build/Cookbook.pm2
-rw-r--r--lib/Module/Build/Dumper.pm2
-rw-r--r--lib/Module/Build/ModuleInfo.pm2
-rw-r--r--lib/Module/Build/Notes.pm2
-rw-r--r--lib/Module/Build/PPMMaker.pm2
-rw-r--r--lib/Module/Build/Platform/Amiga.pm2
-rw-r--r--lib/Module/Build/Platform/Default.pm2
-rw-r--r--lib/Module/Build/Platform/EBCDIC.pm2
-rw-r--r--lib/Module/Build/Platform/MPEiX.pm2
-rw-r--r--lib/Module/Build/Platform/MacOS.pm2
-rw-r--r--lib/Module/Build/Platform/RiscOS.pm2
-rw-r--r--lib/Module/Build/Platform/Unix.pm2
-rw-r--r--lib/Module/Build/Platform/VMS.pm2
-rw-r--r--lib/Module/Build/Platform/VOS.pm2
-rw-r--r--lib/Module/Build/Platform/Windows.pm2
-rw-r--r--lib/Module/Build/Platform/aix.pm2
-rw-r--r--lib/Module/Build/Platform/cygwin.pm2
-rw-r--r--lib/Module/Build/Platform/darwin.pm2
-rw-r--r--lib/Module/Build/Platform/os2.pm2
-rw-r--r--lib/Module/Build/PodParser.pm2
-rw-r--r--lib/Module/Build/Version.pm8
-rw-r--r--lib/Module/Build/t/debug.t37
28 files changed, 98 insertions, 30 deletions
diff --git a/lib/Module/Build.pm b/lib/Module/Build.pm
index ce0cfae6b0..7d3e501b1b 100644
--- a/lib/Module/Build.pm
+++ b/lib/Module/Build.pm
@@ -15,7 +15,7 @@ use Module::Build::Base;
use vars qw($VERSION @ISA);
@ISA = qw(Module::Build::Base);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
# Okay, this is the brute-force method of finding out what kind of
@@ -747,6 +747,11 @@ we're now running under is the same version that was initially invoked
when building the distribution (i.e. when the C<Build.PL> script was
first run). Use with caution.
+=item debug
+
+Prints Module::Build debugging information to STDOUT, such as a trace of
+executed build actions.
+
=back
diff --git a/lib/Module/Build/API.pod b/lib/Module/Build/API.pod
index 18ffe5f1fd..e9a739ed83 100644
--- a/lib/Module/Build/API.pod
+++ b/lib/Module/Build/API.pod
@@ -1795,6 +1795,8 @@ accessor methods for the following properties:
=item create_readme()
+=item debug()
+
=item debugger()
=item destdir()
diff --git a/lib/Module/Build/Base.pm b/lib/Module/Build/Base.pm
index a93f05817c..f902b750a1 100644
--- a/lib/Module/Build/Base.pm
+++ b/lib/Module/Build/Base.pm
@@ -4,7 +4,7 @@ package Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
BEGIN { require 5.00503 }
@@ -191,6 +191,11 @@ sub log_verbose {
my $self = shift;
$self->log_info(@_) if(ref($self) and $self->verbose);
}
+sub log_debug {
+ my $self = shift;
+ print @_ if ref $self && $self->debug;
+}
+
sub log_warn {
# Try to make our call stack invisible
shift;
@@ -920,6 +925,7 @@ __PACKAGE__->add_property($_) for qw(
sign
test_files
verbose
+ debug
xs_files
);
@@ -1593,7 +1599,10 @@ sub _call_action {
local $self->{action} = $action;
my $method = $self->can_action( $action );
die "No action '$action' defined, try running the 'help' action.\n" unless $method;
- return $self->$method();
+ $self->log_debug("Starting ACTION_$action\n");
+ my $rc = $self->$method();
+ $self->log_debug("Finished ACTION_$action\n");
+ return $rc;
}
sub can_action {
@@ -1719,6 +1728,7 @@ sub _optional_arg {
uninst
use_rcfile
verbose
+ debug
sign
use_tap_harness
);
diff --git a/lib/Module/Build/Changes b/lib/Module/Build/Changes
index b6b3d72644..930bfd1688 100644
--- a/lib/Module/Build/Changes
+++ b/lib/Module/Build/Changes
@@ -1,5 +1,21 @@
Revision history for Perl extension Module::Build.
+0.34_02 - Sun Jul 26 22:50:40 EDT 2009
+
+ Bug-fixes:
+ - Bundled Module::Build::Version updated to bring into sync with CPAN
+ version.pm 0.77
+
+0.34_01 - Sat Jul 18 16:32:09 EDT 2009
+
+ Enhancements:
+ - Added --debug flag to trace Build action execution (RT#47933)
+ [David Golden]
+
+ Bug-fixes:
+ - Bundled Module::Build::Version version code updated to fix unsafe use
+ of $@ (RT#47980) [John Peacock]
+
0.34 - Tue Jul 7 16:56:47 EDT 2009
No changes from 0.33_06
diff --git a/lib/Module/Build/Compat.pm b/lib/Module/Build/Compat.pm
index 6b606ae180..f6f8f5d727 100644
--- a/lib/Module/Build/Compat.pm
+++ b/lib/Module/Build/Compat.pm
@@ -2,7 +2,7 @@ package Module::Build::Compat;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
use File::Basename ();
use File::Spec;
diff --git a/lib/Module/Build/Config.pm b/lib/Module/Build/Config.pm
index a18a97f3eb..8e0207b5f3 100644
--- a/lib/Module/Build/Config.pm
+++ b/lib/Module/Build/Config.pm
@@ -2,7 +2,7 @@ package Module::Build::Config;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Config;
diff --git a/lib/Module/Build/Cookbook.pm b/lib/Module/Build/Cookbook.pm
index 0a5097752a..40b84a8c7d 100644
--- a/lib/Module/Build/Cookbook.pm
+++ b/lib/Module/Build/Cookbook.pm
@@ -1,7 +1,7 @@
package Module::Build::Cookbook;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
=head1 NAME
diff --git a/lib/Module/Build/Dumper.pm b/lib/Module/Build/Dumper.pm
index 74426b44b4..078ca7ca02 100644
--- a/lib/Module/Build/Dumper.pm
+++ b/lib/Module/Build/Dumper.pm
@@ -1,7 +1,7 @@
package Module::Build::Dumper;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
# This is just a split-out of a wrapper function to do Data::Dumper
# stuff "the right way". See:
diff --git a/lib/Module/Build/ModuleInfo.pm b/lib/Module/Build/ModuleInfo.pm
index 191b9e9a41..fc36c01dcc 100644
--- a/lib/Module/Build/ModuleInfo.pm
+++ b/lib/Module/Build/ModuleInfo.pm
@@ -8,7 +8,7 @@ package Module::Build::ModuleInfo;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use File::Spec;
diff --git a/lib/Module/Build/Notes.pm b/lib/Module/Build/Notes.pm
index c51610e609..e020e12544 100644
--- a/lib/Module/Build/Notes.pm
+++ b/lib/Module/Build/Notes.pm
@@ -4,7 +4,7 @@ package Module::Build::Notes;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Data::Dumper;
use IO::File;
diff --git a/lib/Module/Build/PPMMaker.pm b/lib/Module/Build/PPMMaker.pm
index 709ba1fc10..aa4b32ad37 100644
--- a/lib/Module/Build/PPMMaker.pm
+++ b/lib/Module/Build/PPMMaker.pm
@@ -2,7 +2,7 @@ package Module::Build::PPMMaker;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
# This code is mostly borrowed from ExtUtils::MM_Unix 6.10_03, with a
diff --git a/lib/Module/Build/Platform/Amiga.pm b/lib/Module/Build/Platform/Amiga.pm
index 3b85eebfb9..dd9232049a 100644
--- a/lib/Module/Build/Platform/Amiga.pm
+++ b/lib/Module/Build/Platform/Amiga.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::Amiga;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/lib/Module/Build/Platform/Default.pm b/lib/Module/Build/Platform/Default.pm
index f2b732a3ea..3b4cbc31c4 100644
--- a/lib/Module/Build/Platform/Default.pm
+++ b/lib/Module/Build/Platform/Default.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::Default;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/lib/Module/Build/Platform/EBCDIC.pm b/lib/Module/Build/Platform/EBCDIC.pm
index 0e7488e726..1b7f57e581 100644
--- a/lib/Module/Build/Platform/EBCDIC.pm
+++ b/lib/Module/Build/Platform/EBCDIC.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::EBCDIC;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/lib/Module/Build/Platform/MPEiX.pm b/lib/Module/Build/Platform/MPEiX.pm
index 4351b70699..895c08dbe1 100644
--- a/lib/Module/Build/Platform/MPEiX.pm
+++ b/lib/Module/Build/Platform/MPEiX.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::MPEiX;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/lib/Module/Build/Platform/MacOS.pm b/lib/Module/Build/Platform/MacOS.pm
index 7dbd6197b9..6d3489f332 100644
--- a/lib/Module/Build/Platform/MacOS.pm
+++ b/lib/Module/Build/Platform/MacOS.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::MacOS;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Base;
use vars qw(@ISA);
diff --git a/lib/Module/Build/Platform/RiscOS.pm b/lib/Module/Build/Platform/RiscOS.pm
index eb22a7fab4..e1e3c357c2 100644
--- a/lib/Module/Build/Platform/RiscOS.pm
+++ b/lib/Module/Build/Platform/RiscOS.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::RiscOS;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/lib/Module/Build/Platform/Unix.pm b/lib/Module/Build/Platform/Unix.pm
index 60f7371697..3b394c98e5 100644
--- a/lib/Module/Build/Platform/Unix.pm
+++ b/lib/Module/Build/Platform/Unix.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::Unix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/lib/Module/Build/Platform/VMS.pm b/lib/Module/Build/Platform/VMS.pm
index b9c2da05d0..d59714874a 100644
--- a/lib/Module/Build/Platform/VMS.pm
+++ b/lib/Module/Build/Platform/VMS.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::VMS;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/lib/Module/Build/Platform/VOS.pm b/lib/Module/Build/Platform/VOS.pm
index 3099cc5b6c..eaa4d66db9 100644
--- a/lib/Module/Build/Platform/VOS.pm
+++ b/lib/Module/Build/Platform/VOS.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::VOS;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Base;
diff --git a/lib/Module/Build/Platform/Windows.pm b/lib/Module/Build/Platform/Windows.pm
index 8dcf52c1b9..21841522c0 100644
--- a/lib/Module/Build/Platform/Windows.pm
+++ b/lib/Module/Build/Platform/Windows.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::Windows;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Config;
diff --git a/lib/Module/Build/Platform/aix.pm b/lib/Module/Build/Platform/aix.pm
index dc685c7a70..388dc44fe0 100644
--- a/lib/Module/Build/Platform/aix.pm
+++ b/lib/Module/Build/Platform/aix.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::aix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
diff --git a/lib/Module/Build/Platform/cygwin.pm b/lib/Module/Build/Platform/cygwin.pm
index 8842db43e2..1ce0a98e0b 100644
--- a/lib/Module/Build/Platform/cygwin.pm
+++ b/lib/Module/Build/Platform/cygwin.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::cygwin;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
diff --git a/lib/Module/Build/Platform/darwin.pm b/lib/Module/Build/Platform/darwin.pm
index cb1449a716..1a0295a338 100644
--- a/lib/Module/Build/Platform/darwin.pm
+++ b/lib/Module/Build/Platform/darwin.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::darwin;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
diff --git a/lib/Module/Build/Platform/os2.pm b/lib/Module/Build/Platform/os2.pm
index 9940a082d7..a65027cc76 100644
--- a/lib/Module/Build/Platform/os2.pm
+++ b/lib/Module/Build/Platform/os2.pm
@@ -2,7 +2,7 @@ package Module::Build::Platform::os2;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
diff --git a/lib/Module/Build/PodParser.pm b/lib/Module/Build/PodParser.pm
index 171d2c49dd..e59ce0137e 100644
--- a/lib/Module/Build/PodParser.pm
+++ b/lib/Module/Build/PodParser.pm
@@ -2,7 +2,7 @@ package Module::Build::PodParser;
use strict;
use vars qw($VERSION);
-$VERSION = '0.34';
+$VERSION = '0.34_02';
$VERSION = eval $VERSION;
use vars qw(@ISA);
diff --git a/lib/Module/Build/Version.pm b/lib/Module/Build/Version.pm
index ac48cdd58c..0664d432ab 100644
--- a/lib/Module/Build/Version.pm
+++ b/lib/Module/Build/Version.pm
@@ -628,15 +628,13 @@ sub _VERSION {
my $class = ref($obj) || $obj;
no strict 'refs';
- eval "require $class" unless %{"$class\::"}; # already existing
- return undef if $@ =~ /Can't locate/ and not defined $req;
-
- if ( not %{"$class\::"} and $] >= 5.008) { # file but no package
+ if ( exists $INC{"$class.pm"} and not %{"$class\::"} and $] >= 5.008) {
+ # file but no package
require Carp;
Carp::croak( "$class defines neither package nor VERSION"
."--version check failed");
}
-
+
my $version = eval "\$$class\::VERSION";
if ( defined $version ) {
local $^W if $] <= 5.008;
diff --git a/lib/Module/Build/t/debug.t b/lib/Module/Build/t/debug.t
new file mode 100644
index 0000000000..decce51afe
--- /dev/null
+++ b/lib/Module/Build/t/debug.t
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+
+use strict;
+use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib';
+use MBTest tests => 3;
+
+require_ok('Module::Build');
+ensure_blib('Module::Build');
+
+my $tmp = MBTest->tmpdir;
+
+use DistGen;
+my $dist = DistGen->new( dir => $tmp );
+$dist->regen;
+END{ $dist->remove }
+
+$dist->chdir_in;
+
+#########################
+
+# Test debug output
+{
+ my $output;
+ $output = stdout_of sub {
+ Module::Build->run_perl_script('Build.PL', [], [])
+ };
+ $output = stdout_of sub {
+ Module::Build->run_perl_script('Build', [], ['--debug'])
+ };
+ like($output, '/Starting ACTION_build.*?Starting ACTION_code.*?Finished ACTION_code.*?Finished ACTION_build/ms',
+ "found nested ACTION_* debug statements"
+ );
+}
+
+#########################
+
+# cleanup