In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/75e3c8a32e5d9a53167aa1dbfdc9809cfea8cabf?hp=84d2fa142c064fe21af5121174d51b764b9d9c69>

- Log -----------------------------------------------------------------
commit 75e3c8a32e5d9a53167aa1dbfdc9809cfea8cabf
Author: David Mitchell <[email protected]>
Date:   Mon Jul 6 22:16:57 2009 +0100

    upgrade to ExtUtils::MakeMaker 6.53_03
-----------------------------------------------------------------------

Summary of changes:
 MANIFEST                         |    1 +
 Porting/Maintainers.pl           |    2 +-
 lib/ExtUtils/Changes             |   17 +++++++++++
 lib/ExtUtils/Command/MM.pm       |    2 +-
 lib/ExtUtils/Liblist.pm          |    2 +-
 lib/ExtUtils/Liblist/Kid.pm      |    2 +-
 lib/ExtUtils/MM.pm               |    7 +++--
 lib/ExtUtils/MM_AIX.pm           |    2 +-
 lib/ExtUtils/MM_Any.pm           |    2 +-
 lib/ExtUtils/MM_BeOS.pm          |    2 +-
 lib/ExtUtils/MM_Cygwin.pm        |    2 +-
 lib/ExtUtils/MM_DOS.pm           |    2 +-
 lib/ExtUtils/MM_Darwin.pm        |    2 +-
 lib/ExtUtils/MM_MacOS.pm         |    2 +-
 lib/ExtUtils/MM_NW5.pm           |    2 +-
 lib/ExtUtils/MM_OS2.pm           |    2 +-
 lib/ExtUtils/MM_QNX.pm           |    2 +-
 lib/ExtUtils/MM_UWIN.pm          |    2 +-
 lib/ExtUtils/MM_Unix.pm          |    2 +-
 lib/ExtUtils/MM_VMS.pm           |    2 +-
 lib/ExtUtils/MM_VOS.pm           |    2 +-
 lib/ExtUtils/MM_Win32.pm         |    2 +-
 lib/ExtUtils/MM_Win95.pm         |    2 +-
 lib/ExtUtils/MY.pm               |    2 +-
 lib/ExtUtils/MakeMaker.pm        |   55 +++++++++++++++++++++++++++++---------
 lib/ExtUtils/MakeMaker/Config.pm |    2 +-
 lib/ExtUtils/Mkbootstrap.pm      |    2 +-
 lib/ExtUtils/Mksymlists.pm       |    2 +-
 lib/ExtUtils/t/MM_Cygwin.t       |   25 +++++++++-------
 lib/ExtUtils/t/installed_file.t  |   43 +++++++++++++++++++++++++++++
 lib/ExtUtils/t/pod2man.t         |    6 ++--
 lib/ExtUtils/t/prereq.t          |    4 +-
 lib/ExtUtils/testlib.pm          |    2 +-
 t/lib/MakeMaker/Test/NoXS.pm     |    5 +++
 34 files changed, 156 insertions(+), 57 deletions(-)
 create mode 100644 lib/ExtUtils/t/installed_file.t

diff --git a/MANIFEST b/MANIFEST
index 3e560b2..9eb6e2a 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2236,6 +2236,7 @@ lib/ExtUtils/t/fix_libs.t Test for ExtUtils::MakeMaker
 lib/ExtUtils/t/hints.t         See if hint files are honored.
 lib/ExtUtils/t/Installapi2.t   See if new api for ExtUtils::Install::install() 
works
 lib/ExtUtils/t/INSTALL_BASE.t  Test INSTALL_BASE in MakeMaker
+lib/ExtUtils/t/installed_file.t Test for ExtUtils::MakeMaker
 lib/ExtUtils/t/Installed.t     See if ExtUtils::Installed works
 lib/ExtUtils/t/Install.t       See if ExtUtils::Install works
 lib/ExtUtils/t/INST_PREFIX.t   See if MakeMaker can apply PREFIXs
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index d869685..c08fd5d 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -694,7 +694,7 @@ package Maintainers;
     'ExtUtils::MakeMaker' =>
        {
        'MAINTAINER'    => 'mschwern',
-       'DISTRIBUTION'  => 'MSCHWERN/ExtUtils-MakeMaker-6.53_02.tar.gz',
+       'DISTRIBUTION'  => 'MSCHWERN/ExtUtils-MakeMaker-6.53_03.tar.gz',
                            # note that t/lib/TieOut.pm is included in
                            # more than one distro
        'FILES'         => 
q[lib/ExtUtils/{Liblist,MakeMaker,Mkbootstrap,Mksymlists,MM*,MY,testlib}.pm
diff --git a/lib/ExtUtils/Changes b/lib/ExtUtils/Changes
index b94843e..88c431e 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 f893852..e13baa9 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 58dadc0..94fb8ef 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 ab89b32..adb8a48 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 2f74088..39e3b4d 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 12b83ae..e0dc539 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 9ec3e06..9a971b4 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 34d6258..1629333 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 3929ceb..e57d004 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 03537cc..af80bde 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 cbbdf6c..b3a90a0 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 64173ce..3e42998 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 0c12905..6efd4a4 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 3c0bea9..6b780a7 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 a4eae59..bd97c3a 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 d89b47c..ea59ef5 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 82bb654..59a612a 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 16cc0f7..f524b2b 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 686245c..af703eb 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 4b9e9b8..5e5aaf2 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 cd7afe8..52bfca4 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 23f4108..5d14b3e 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 33665f2..2d140be 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 b9859ed..fc028ba 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 5f8ae47..5684934 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 5aa6ef7..f9d517c 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 36ada35..d952188 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 0000000..ebb6585
--- /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 fa533bd..c3dd2e2 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 c690a55..e92e5a0 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 f4241de..ab0ab89 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;
diff --git a/t/lib/MakeMaker/Test/NoXS.pm b/t/lib/MakeMaker/Test/NoXS.pm
index ef20e66..45faf7e 100644
--- a/t/lib/MakeMaker/Test/NoXS.pm
+++ b/t/lib/MakeMaker/Test/NoXS.pm
@@ -7,6 +7,11 @@ use Carp;
 require DynaLoader;
 require XSLoader;
 
+# Things like Cwd key on this to decide if they're running miniperl
+delete $DynaLoader::{boot_DynaLoader};
+
+# This isn't 100%.  Things like Win32.pm will crap out rather than
+# just not load.  See ExtUtils::MM->_is_win95 for an example
 no warnings 'redefine';
 *DynaLoader::bootstrap = sub { confess "Tried to load XS for @_"; };
 *XSLoader::load        = sub { confess "Tried to load XS for @_"; };

--
Perl5 Master Repository

Reply via email to