diff options
author | David Mitchell <davem@iabyn.com> | 2009-07-06 22:16:57 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2009-07-06 22:17:45 +0100 |
commit | 75e3c8a32e5d9a53167aa1dbfdc9809cfea8cabf (patch) | |
tree | d15326408549e3f362f65cca5686975d55cabe52 /lib/ExtUtils | |
parent | 84d2fa142c064fe21af5121174d51b764b9d9c69 (diff) | |
download | perl-75e3c8a32e5d9a53167aa1dbfdc9809cfea8cabf.tar.gz |
upgrade to ExtUtils::MakeMaker 6.53_03
Diffstat (limited to 'lib/ExtUtils')
31 files changed, 149 insertions, 56 deletions
diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes index b94843ef95..88c431e30d 100644 --- a/lib/ExtUtils/Changes +++ b/lib/ExtUtils/Changes @@ -1,3 +1,20 @@ +6.53_03 Thu Jul 2 14:47:45 PDT 2009 + Bug Fixes + * You'd get a warning if you had a PREREQ_PM on a module with no $VERSION + like Config (broken in 6.51_01) [rt.cpan.org 47448] + + Test Fixes + * Upgrade the version of Test::More we ship with to 0.88. + * Fix MM_Cygwin.t for older Perls missing Cygwin::win_to_posix_path() + broken in 6.53_01. + * Fix miniperl.t for Windows. Our method of shutting off XS didn't + work for Win32.pm + * Old versions of version.pm, like what ships with OS X, dent Foo->VERSION + causing prereq.t to fail. [rt.cpan.org 47296] + * Add missing core test boilerplates + [blead e39d780342f3e91579069fdc80eda72bfe639ae7] + + 6.53_02 Sun Jun 7 19:24:56 PDT 2009 Test Fixes * Stray use of Shell::Command broke older perls diff --git a/lib/ExtUtils/Command/MM.pm b/lib/ExtUtils/Command/MM.pm index f893852f6e..e13baa9b38 100644 --- a/lib/ExtUtils/Command/MM.pm +++ b/lib/ExtUtils/Command/MM.pm @@ -10,7 +10,7 @@ our @ISA = qw(Exporter); our @EXPORT = qw(test_harness pod2man perllocal_install uninstall warn_if_old_packlist); -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; my $Is_VMS = $^O eq 'VMS'; diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm index 58dadc0895..94fb8ef579 100644 --- a/lib/ExtUtils/Liblist.pm +++ b/lib/ExtUtils/Liblist.pm @@ -2,7 +2,7 @@ package ExtUtils::Liblist; use strict; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; use File::Spec; require ExtUtils::Liblist::Kid; diff --git a/lib/ExtUtils/Liblist/Kid.pm b/lib/ExtUtils/Liblist/Kid.pm index ab89b32392..adb8a48cec 100644 --- a/lib/ExtUtils/Liblist/Kid.pm +++ b/lib/ExtUtils/Liblist/Kid.pm @@ -9,7 +9,7 @@ use 5.006; # Broken out of MakeMaker from version 4.11 use strict; -our $VERSION = 6.53_02; +our $VERSION = 6.53_03; use Config; use Cwd 'cwd'; diff --git a/lib/ExtUtils/MM.pm b/lib/ExtUtils/MM.pm index 2f74088648..39e3b4d2ee 100644 --- a/lib/ExtUtils/MM.pm +++ b/lib/ExtUtils/MM.pm @@ -3,7 +3,7 @@ package ExtUtils::MM; use strict; use ExtUtils::MakeMaker::Config; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; require ExtUtils::Liblist; require ExtUtils::MakeMaker; @@ -44,8 +44,9 @@ away. sub _is_win95 { # miniperl might not have the Win32 functions available and we need # to run in miniperl. - return defined &Win32::IsWin95 ? Win32::IsWin95() - : ! defined $ENV{SYSTEMROOT}; + my $have_win32 = eval { require Win32 }; + return $have_win32 && defined &Win32::IsWin95 ? Win32::IsWin95() + : ! defined $ENV{SYSTEMROOT}; } my %Is = (); diff --git a/lib/ExtUtils/MM_AIX.pm b/lib/ExtUtils/MM_AIX.pm index 12b83ae978..e0dc53953c 100644 --- a/lib/ExtUtils/MM_AIX.pm +++ b/lib/ExtUtils/MM_AIX.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_AIX; use strict; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm index 9ec3e06a8a..9a971b4ea9 100644 --- a/lib/ExtUtils/MM_Any.pm +++ b/lib/ExtUtils/MM_Any.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_Any; use strict; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; use Carp; use File::Spec; diff --git a/lib/ExtUtils/MM_BeOS.pm b/lib/ExtUtils/MM_BeOS.pm index 34d62585bb..1629333efb 100644 --- a/lib/ExtUtils/MM_BeOS.pm +++ b/lib/ExtUtils/MM_BeOS.pm @@ -26,7 +26,7 @@ require ExtUtils::MM_Any; require ExtUtils::MM_Unix; our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; =item os_flavor diff --git a/lib/ExtUtils/MM_Cygwin.pm b/lib/ExtUtils/MM_Cygwin.pm index 3929ceb9a5..e57d004db0 100644 --- a/lib/ExtUtils/MM_Cygwin.pm +++ b/lib/ExtUtils/MM_Cygwin.pm @@ -9,7 +9,7 @@ require ExtUtils::MM_Unix; require ExtUtils::MM_Win32; our @ISA = qw( ExtUtils::MM_Unix ); -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; =head1 NAME diff --git a/lib/ExtUtils/MM_DOS.pm b/lib/ExtUtils/MM_DOS.pm index 03537cc7e3..af80bde8ad 100644 --- a/lib/ExtUtils/MM_DOS.pm +++ b/lib/ExtUtils/MM_DOS.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_DOS; use strict; -our $VERSION = 6.53_02; +our $VERSION = 6.53_03; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/lib/ExtUtils/MM_Darwin.pm b/lib/ExtUtils/MM_Darwin.pm index cbbdf6c7b7..b3a90a074e 100644 --- a/lib/ExtUtils/MM_Darwin.pm +++ b/lib/ExtUtils/MM_Darwin.pm @@ -7,7 +7,7 @@ BEGIN { our @ISA = qw( ExtUtils::MM_Unix ); } -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; =head1 NAME diff --git a/lib/ExtUtils/MM_MacOS.pm b/lib/ExtUtils/MM_MacOS.pm index 64173cede3..3e429986ce 100644 --- a/lib/ExtUtils/MM_MacOS.pm +++ b/lib/ExtUtils/MM_MacOS.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_MacOS; use strict; -our $VERSION = 6.53_02; +our $VERSION = 6.53_03; sub new { die <<'UNSUPPORTED'; diff --git a/lib/ExtUtils/MM_NW5.pm b/lib/ExtUtils/MM_NW5.pm index 0c1290579e..6efd4a4be5 100644 --- a/lib/ExtUtils/MM_NW5.pm +++ b/lib/ExtUtils/MM_NW5.pm @@ -22,7 +22,7 @@ use strict; use ExtUtils::MakeMaker::Config; use File::Basename; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; require ExtUtils::MM_Win32; our @ISA = qw(ExtUtils::MM_Win32); diff --git a/lib/ExtUtils/MM_OS2.pm b/lib/ExtUtils/MM_OS2.pm index 3c0bea9d8c..6b780a7523 100644 --- a/lib/ExtUtils/MM_OS2.pm +++ b/lib/ExtUtils/MM_OS2.pm @@ -5,7 +5,7 @@ use strict; use ExtUtils::MakeMaker qw(neatvalue); use File::Spec; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/lib/ExtUtils/MM_QNX.pm b/lib/ExtUtils/MM_QNX.pm index a4eae596a2..bd97c3a6dd 100644 --- a/lib/ExtUtils/MM_QNX.pm +++ b/lib/ExtUtils/MM_QNX.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_QNX; use strict; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_UWIN.pm b/lib/ExtUtils/MM_UWIN.pm index d89b47c586..ea59ef5a7a 100644 --- a/lib/ExtUtils/MM_UWIN.pm +++ b/lib/ExtUtils/MM_UWIN.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_UWIN; use strict; -our $VERSION = 6.53_02; +our $VERSION = 6.53_03; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 82bb654640..59a612a05b 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -15,7 +15,7 @@ use ExtUtils::MakeMaker qw($Verbose neatvalue); # If we make $VERSION an our variable parse_version() breaks use vars qw($VERSION); -$VERSION = '6.53_02'; +$VERSION = '6.53_03'; require ExtUtils::MM_Any; our @ISA = qw(ExtUtils::MM_Any); diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index 16cc0f70a4..f524b2b4bf 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -15,7 +15,7 @@ BEGIN { use File::Basename; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/lib/ExtUtils/MM_VOS.pm b/lib/ExtUtils/MM_VOS.pm index 686245c662..af703ebb87 100644 --- a/lib/ExtUtils/MM_VOS.pm +++ b/lib/ExtUtils/MM_VOS.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_VOS; use strict; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index 4b9e9b8fb3..5e5aaf2bc4 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -27,7 +27,7 @@ use ExtUtils::MakeMaker qw( neatvalue ); require ExtUtils::MM_Any; require ExtUtils::MM_Unix; our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; $ENV{EMXSHELL} = 'sh'; # to run `commands` diff --git a/lib/ExtUtils/MM_Win95.pm b/lib/ExtUtils/MM_Win95.pm index cd7afe85c1..52bfca4132 100644 --- a/lib/ExtUtils/MM_Win95.pm +++ b/lib/ExtUtils/MM_Win95.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_Win95; use strict; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; require ExtUtils::MM_Win32; our @ISA = qw(ExtUtils::MM_Win32); diff --git a/lib/ExtUtils/MY.pm b/lib/ExtUtils/MY.pm index 23f4108c72..5d14b3e189 100644 --- a/lib/ExtUtils/MY.pm +++ b/lib/ExtUtils/MY.pm @@ -3,7 +3,7 @@ package ExtUtils::MY; use strict; require ExtUtils::MM; -our $VERSION = 6.53_02; +our $VERSION = 6.53_03; our @ISA = qw(ExtUtils::MM); { diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 33665f2363..2d140be1b5 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -18,7 +18,7 @@ our @Overridable; my @Prepend_parent; my %Recognized_Att_Keys; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; # Emulate something resembling CVS $Revision$ (our $Revision = $VERSION) =~ s{_}{}; @@ -457,22 +457,15 @@ END my(%unsatisfied) = (); foreach my $prereq (sort keys %{$self->{PREREQ_PM}}) { - my $file = "$prereq.pm"; - $file =~ s{::}{/}g; - my $path; - for my $dir (@INC) { - my $tmp = File::Spec->catfile($dir, $file); - if( -r $tmp ) { - $path = $tmp; - last; - } - } - my $pr_version = defined $path ? MM->parse_version($path) : 0; + my $installed_file = MM->_installed_file_for_module($prereq); + my $pr_version = 0; + $pr_version = MM->parse_version($installed_file) if $installed_file; + $pr_version = 0 if $pr_version eq 'undef'; # convert X.Y_Z alpha version #s to X.YZ for easier comparisons $pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/; - if (!defined $path) { + if (!$installed_file) { warn sprintf "Warning: prerequisite %s %s not found.\n", $prereq, $self->{PREREQ_PM}{$prereq} unless $self->{PREREQ_FATAL}; @@ -718,6 +711,42 @@ EOP close $mfh or die "close $new for write: $!"; } + +=begin private + +=head3 _installed_file_for_module + + my $file = MM->_installed_file_for_module($module); + +Return the first installed .pm $file associated with the $module. The +one which will show up when you C<use $module>. + +$module is something like "strict" or "Test::More". + +=end private + +=cut + +sub _installed_file_for_module { + my $class = shift; + my $prereq = shift; + + my $file = "$prereq.pm"; + $file =~ s{::}{/}g; + + my $path; + for my $dir (@INC) { + my $tmp = File::Spec->catfile($dir, $file); + if ( -r $tmp ) { + $path = $tmp; + last; + } + } + + return $path; +} + + sub check_manifest { print STDOUT "Checking if your kit is complete...\n"; require ExtUtils::Manifest; diff --git a/lib/ExtUtils/MakeMaker/Config.pm b/lib/ExtUtils/MakeMaker/Config.pm index b9859ed6b8..fc028ba6dc 100644 --- a/lib/ExtUtils/MakeMaker/Config.pm +++ b/lib/ExtUtils/MakeMaker/Config.pm @@ -2,7 +2,7 @@ package ExtUtils::MakeMaker::Config; use strict; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; use Config (); diff --git a/lib/ExtUtils/Mkbootstrap.pm b/lib/ExtUtils/Mkbootstrap.pm index 5f8ae47488..568493494b 100644 --- a/lib/ExtUtils/Mkbootstrap.pm +++ b/lib/ExtUtils/Mkbootstrap.pm @@ -3,7 +3,7 @@ package ExtUtils::Mkbootstrap; # There's just too much Dynaloader incest here to turn on strict vars. use strict 'refs'; -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; require Exporter; our @ISA = ('Exporter'); diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index 5aa6ef78cc..f9d517c20b 100644 --- a/lib/ExtUtils/Mksymlists.pm +++ b/lib/ExtUtils/Mksymlists.pm @@ -10,7 +10,7 @@ use Config; our @ISA = qw(Exporter); our @EXPORT = qw(&Mksymlists); -our $VERSION = '6.53_02'; +our $VERSION = '6.53_03'; sub Mksymlists { my(%spec) = @_; diff --git a/lib/ExtUtils/t/MM_Cygwin.t b/lib/ExtUtils/t/MM_Cygwin.t index 36ada354b8..d952188c44 100644 --- a/lib/ExtUtils/t/MM_Cygwin.t +++ b/lib/ExtUtils/t/MM_Cygwin.t @@ -100,25 +100,28 @@ like( $res, qr/pure_all.*foo.*foo.1/s, '... should add MAN3PODS targets' ); # Tests for correct handling of maybe_command in /cygdrive/* # and c:/*. $ENV{COMSPEC}, if it exists, should always be executable. - SKIP: { - my $comspec = $ENV{COMSPEC}; - skip(q[$ENV{COMSPEC} does not exist], 1) unless $comspec; + skip "Needs Cygwin::win_to_posix_path()", 2 unless defined &Cygwin::win_to_posix_path; - $comspec = Cygwin::win_to_posix_path($comspec); + SKIP: { + my $comspec = $ENV{COMSPEC}; + skip(q[$ENV{COMSPEC} does not exist], 1) unless $comspec; - ok MM->maybe_command($comspec), qq{'$comspec' should be executable"}; -} + $comspec = Cygwin::win_to_posix_path($comspec); -# 'C:/' should *never* be executable, it's a directory. -{ - my $cdrive = Cygwin::win_to_posix_path("C:/"); + ok(MM->maybe_command($comspec), qq{'$comspec' should be executable"}); + } + + # 'C:/' should *never* be executable, it's a directory. + { + my $cdrive = Cygwin::win_to_posix_path("C:/"); - ok !MM->maybe_command($cdrive), qq{'$cdrive' should never be executable}; + ok(!MM->maybe_command($cdrive), qq{'$cdrive' should never be executable}); + } } # Our copy of Perl (with a unix-path) should always be executable. -ok MM->maybe_command($Config{perlpath}), qq{'$Config{perlpath}' should be executable}; +ok(MM->maybe_command($Config{perlpath}), qq{'$Config{perlpath}' should be executable}); package FakeOut; diff --git a/lib/ExtUtils/t/installed_file.t b/lib/ExtUtils/t/installed_file.t new file mode 100644 index 0000000000..ebb6585528 --- /dev/null +++ b/lib/ExtUtils/t/installed_file.t @@ -0,0 +1,43 @@ +#!/usr/bin/perl -w + +# Test MM->_installed_file_for_module() + +use strict; +use warnings; + +use lib 't/lib'; +use ExtUtils::MakeMaker; +use Test::More; +use File::Spec; + + +sub path_is { + my($have, $want, $name) = @_; + + $have = File::Spec->canonpath($have); + $want = File::Spec->canonpath($want); + + my $builder = Test::More->builder; + return $builder->is_eq( $have, $want, $name ); +} + +# Test when a module is not installed +{ + ok !MM->_installed_file_for_module("aaldkfjaldj"), "Module not installed"; + ok !MM->_installed_file_for_module("aaldkfjaldj::dlajldkj"); +} + +# Try a single name module +{ + my $want = $INC{'strict.pm'}; + path_is( MM->_installed_file_for_module("strict"), $want, "single name module" ); +} + +# And a tuple +{ + my $want = $INC{"Test/More.pm"}; + path_is( MM->_installed_file_for_module("Test::More"), $want, "Foo::Bar style" ); +} + + +done_testing(4); diff --git a/lib/ExtUtils/t/pod2man.t b/lib/ExtUtils/t/pod2man.t index fa533bdcf0..c3dd2e23e1 100644 --- a/lib/ExtUtils/t/pod2man.t +++ b/lib/ExtUtils/t/pod2man.t @@ -1,14 +1,14 @@ #!/usr/bin/perl -w +# Test our simulation of pod2man + BEGIN { if ($ENV{PERL_CORE}) { chdir 't' if -d 't'; - @INC = qw(../lib); + @INC = qw(../lib lib); } } -# Test our simulation of pod2man - use strict; use lib 't/lib'; diff --git a/lib/ExtUtils/t/prereq.t b/lib/ExtUtils/t/prereq.t index c690a55a02..e92e5a01c4 100644 --- a/lib/ExtUtils/t/prereq.t +++ b/lib/ExtUtils/t/prereq.t @@ -59,7 +59,7 @@ ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) || ); is $warnings, sprintf("Warning: prerequisite strict 99999 not found. We have %s.\n", - strict->VERSION); + $strict::VERSION); $warnings = ''; WriteMakefile( @@ -82,7 +82,7 @@ ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) || is $warnings, "Warning: prerequisite I::Do::Not::Exist 0 not found.\n". sprintf("Warning: prerequisite strict 99999 not found. We have %s.\n", - strict->VERSION); + $strict::VERSION); $warnings = ''; eval { diff --git a/lib/ExtUtils/testlib.pm b/lib/ExtUtils/testlib.pm index f4241de44f..ab0ab8977a 100644 --- a/lib/ExtUtils/testlib.pm +++ b/lib/ExtUtils/testlib.pm @@ -3,7 +3,7 @@ package ExtUtils::testlib; use strict; use warnings; -our $VERSION = 6.53_02; +our $VERSION = 6.53_03; use Cwd; use File::Spec; |