From: David Golden Date: Mon, 27 Jul 2009 02:58:56 +0000 (-0400) Subject: Update Module::Build to 0.34_02 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4085a377252e8493c61e9548893d25030c462b89;p=p5sagit%2Fp5-mst-13.2.git 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] --- diff --git a/MANIFEST b/MANIFEST index 90f1156..8418f61 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2616,6 +2616,7 @@ lib/Module/Build/t/basic.t Module::Build lib/Module/Build/t/bundled/Tie/CPHash.pm Module::Build.pm lib/Module/Build/t/compat/exit.t Module::Build lib/Module/Build/t/compat.t Module::Build +lib/Module/Build/t/debug.t Module::Build tests lib/Module/Build/t/destinations.t Module::Build lib/Module/Build/t/extend.t Module::Build lib/Module/Build/t/ext.t Module::Build diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index a65ead9..c85166c 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1188,7 +1188,7 @@ package Maintainers; 'Module::Build' => { 'MAINTAINER' => 'kwilliams', - 'DISTRIBUTION' => 'DAGOLDEN/Module-Build-0.34.tar.gz', + 'DISTRIBUTION' => 'DAGOLDEN/Module-Build-0.34_02.tar.gz', 'FILES' => q[lib/Module/Build lib/Module/Build.pm], 'EXCLUDED' => [ qw{ t/par.t t/signature.t scripts/bundle.pl}, ], 'CPAN' => 1, diff --git a/lib/Module/Build.pm b/lib/Module/Build.pm index ce0cfae..7d3e501 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 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 18ffe5f..e9a739e 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 a93f058..f902b75 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 b6b3d72..930bfd1 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 6b606ae..f6f8f5d 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 a18a97f..8e0207b 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 0a50977..40b84a8 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 74426b4..078ca7c 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 191b9e9..fc36c01 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 c51610e..e020e12 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 709ba1f..aa4b32a 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 3b85eeb..dd92320 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 f2b732a..3b4cbc3 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 0e7488e..1b7f57e 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 4351b70..895c08d 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 7dbd619..6d3489f 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 eb22a7f..e1e3c35 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 60f7371..3b394c9 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 b9c2da0..d597148 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 3099cc5..eaa4d66 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 8dcf52c..2184152 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 dc685c7..388dc44 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 8842db4..1ce0a98 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 cb1449a..1a0295a 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 9940a08..a65027c 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 171d2c4..e59ce01 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 ac48cdd..0664d43 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 0000000..decce51 --- /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