From: David Golden Date: Mon, 6 Jul 2009 03:37:32 +0000 (-0400) Subject: Update Module::Build to 0.33_06 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=752ce16633029b870704ea72df1c7040865414d7;p=p5sagit%2Fp5-mst-13.2.git Update Module::Build to 0.33_06 0.33_06 - Sun Jul 5 10:11:40 EDT 2009 Bug-fixes: - Bundled version code will use pure Perl on 5.10.0 to work around a corner case involving eval and locale [John Peacock] - Reversed VMS patch from 0.33_03 [Craig Berry] - PL_files in Build.PL that are in the bin/scripts directory should not be installed as if they are scripts (fixed for case-tolerant systems). [David Golden, reported by Craig Berry] Signed-off-by: H.Merijn Brand --- diff --git a/lib/Module/Build.pm b/lib/Module/Build.pm index 8867695..cb144e8 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; # Okay, this is the brute-force method of finding out what kind of diff --git a/lib/Module/Build/Base.pm b/lib/Module/Build/Base.pm index 470e536..4be15ab 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; BEGIN { require 5.00503 } @@ -3500,24 +3500,32 @@ sub _files_in { sub script_files { my $self = shift; - + for ($self->{properties}{script_files}) { $_ = shift if @_; next unless $_; - + # Always coerce into a hash return $_ if UNIVERSAL::isa($_, 'HASH'); return $_ = { map {$_,1} @$_ } if UNIVERSAL::isa($_, 'ARRAY'); - + die "'script_files' must be a hashref, arrayref, or string" if ref(); - + return $_ = { map {$_,1} $self->_files_in( $_ ) } if -d $_; return $_ = {$_ => 1}; } - - my %pl_files = map { File::Spec->canonpath($_) => 1 } - keys %{ $self->PL_files || {} }; - return $_ = { map {$_ => 1} grep !$pl_files{$_}, $self->_files_in('bin') }; + + my %pl_files = map { + File::Spec->canonpath( File::Spec->case_tolerant ? uc $_ : $_ ) => 1 + } keys %{ $self->PL_files || {} }; + + my @bin_files = $self->_files_in('bin'); + + my %bin_map = map { + $_ => File::Spec->canonpath( File::Spec->case_tolerant ? uc $_ : $_ ) + } @bin_files; + + return $_ = { map {$_ => 1} grep !$pl_files{$bin_map{$_}}, @bin_files }; } BEGIN { *scripts = \&script_files; } diff --git a/lib/Module/Build/Compat.pm b/lib/Module/Build/Compat.pm index 14f564c..df8c658 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.33_05'; +$VERSION = '0.33_06'; use File::Basename (); use File::Spec; diff --git a/lib/Module/Build/Config.pm b/lib/Module/Build/Config.pm index 90f60dc..bcd6736 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Config; diff --git a/lib/Module/Build/ConfigData.pm b/lib/Module/Build/ConfigData.pm index 3f539af..76956bc 100644 --- a/lib/Module/Build/ConfigData.pm +++ b/lib/Module/Build/ConfigData.pm @@ -67,6 +67,7 @@ sub feature { while (my ($modname, $spec) = each %p) { my $status = Module::Build->check_installed_status($modname, $spec); if ((!$status->{ok}) xor ($type =~ /conflicts$/)) { return 0; } + if ( ! eval "require $modname; 1" ) { return 0; } } } return 1; diff --git a/lib/Module/Build/Cookbook.pm b/lib/Module/Build/Cookbook.pm index e67eb87..58f2382 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.33_05'; +$VERSION = '0.33_06'; =head1 NAME diff --git a/lib/Module/Build/Dumper.pm b/lib/Module/Build/Dumper.pm index 13a1d0f..fd4e029 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.33_05'; +$VERSION = '0.33_06'; # 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 9919519..38780c7 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use File::Spec; diff --git a/lib/Module/Build/Notes.pm b/lib/Module/Build/Notes.pm index 1999226..5298316 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Data::Dumper; use IO::File; diff --git a/lib/Module/Build/PPMMaker.pm b/lib/Module/Build/PPMMaker.pm index 7b5c707..6f38992 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.33_05'; +$VERSION = '0.33_06'; $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 53fe6df..94821d5 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Module::Build::Base; diff --git a/lib/Module/Build/Platform/Default.pm b/lib/Module/Build/Platform/Default.pm index 59caddb..8f94323 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Module::Build::Base; diff --git a/lib/Module/Build/Platform/EBCDIC.pm b/lib/Module/Build/Platform/EBCDIC.pm index f488bf3..80673c8 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Module::Build::Base; diff --git a/lib/Module/Build/Platform/MPEiX.pm b/lib/Module/Build/Platform/MPEiX.pm index 9c99c7f..4ec24c5 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Module::Build::Base; diff --git a/lib/Module/Build/Platform/MacOS.pm b/lib/Module/Build/Platform/MacOS.pm index b49226b..e7de78e 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.33_05'; +$VERSION = '0.33_06'; $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 b932266..e8bd9be 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Module::Build::Base; diff --git a/lib/Module/Build/Platform/Unix.pm b/lib/Module/Build/Platform/Unix.pm index 5f04d1b..359f0c9 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Module::Build::Base; diff --git a/lib/Module/Build/Platform/VMS.pm b/lib/Module/Build/Platform/VMS.pm index 4048487..fb61fe0 100644 --- a/lib/Module/Build/Platform/VMS.pm +++ b/lib/Module/Build/Platform/VMS.pm @@ -2,49 +2,13 @@ package Module::Build::Platform::VMS; use strict; use vars qw($VERSION); -$VERSION = '0.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Module::Build::Base; use vars qw(@ISA); @ISA = qw(Module::Build::Base); -# Need to look up the feature settings. The preferred way is to use the -# VMS::Feature module, but that may not be available to dual life modules. - -my $use_feature; -BEGIN { - if (eval { local $SIG{__DIE__}; require VMS::Feature; }) { - $use_feature = 1; - } -} - -# Need to look up the UNIX report mode. This may become a dynamic mode -# in the future. -sub _unix_rpt { - my $unix_rpt; - if ($use_feature) { - $unix_rpt = VMS::Feature::current("filename_unix_report"); - } else { - my $env_unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || ''; - $unix_rpt = $env_unix_rpt =~ /^[ET1]/i; - } - return $unix_rpt; -} - -# Need to look up the EFS character set mode. This may become a dynamic -# mode in the future. -sub _efs { - my $efs; - if ($use_feature) { - $efs = VMS::Feature::current("efs_charset"); - } else { - my $env_efs = $ENV{'DECC$EFS_CHARSET'} || ''; - $efs = $env_efs =~ /^[ET1]/i; - } - return $efs; -} - =head1 NAME diff --git a/lib/Module/Build/Platform/VOS.pm b/lib/Module/Build/Platform/VOS.pm index 3fdc4b9..8167094 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Module::Build::Base; diff --git a/lib/Module/Build/Platform/Windows.pm b/lib/Module/Build/Platform/Windows.pm index ad490f0..9aad3f2 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Config; diff --git a/lib/Module/Build/Platform/aix.pm b/lib/Module/Build/Platform/aix.pm index be89ba8..599c556 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.33_05'; +$VERSION = '0.33_06'; $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 774bea8..675de65 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.33_05'; +$VERSION = '0.33_06'; $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 4374af4..4353b79 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.33_05'; +$VERSION = '0.33_06'; $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 1c2ef0d..a6a04df 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use Module::Build::Platform::Unix; diff --git a/lib/Module/Build/PodParser.pm b/lib/Module/Build/PodParser.pm index 72a6db0..ed84c6c 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.33_05'; +$VERSION = '0.33_06'; $VERSION = eval $VERSION; use vars qw(@ISA); diff --git a/lib/Module/Build/Version.pm b/lib/Module/Build/Version.pm index 99e392f..ac48cdd 100644 --- a/lib/Module/Build/Version.pm +++ b/lib/Module/Build/Version.pm @@ -48,7 +48,7 @@ use strict; use vars qw(@ISA $VERSION $CLASS *declare *qv); -$VERSION = 0; +$VERSION = 0.77; $CLASS = 'version'; @@ -61,6 +61,7 @@ if ($] > 5.009001 && $] <= 5.010000) { no strict 'refs'; *{'version::stringify'} = \*version::vpp::stringify; *{'version::(""'} = \*version::vpp::stringify; + *{'version::new'} = \*version::vpp::new; } # Preloaded methods go here. @@ -121,6 +122,7 @@ use POSIX qw/locale_h/; use locale; use vars qw ($VERSION @ISA @REGEXS); $VERSION = '0.77'; +$VERSION = eval $VERSION; push @REGEXS, qr/ ^v? # optional leading 'v'