Update ExtUtils-MakeMaker to CPAN version 6.63_02
authorSteve Hay <steve.m.hay@googlemail.com>
Wed, 2 Nov 2011 09:30:05 +0000 (09:30 +0000)
committerSteve Hay <steve.m.hay@googlemail.com>
Wed, 2 Nov 2011 09:30:05 +0000 (09:30 +0000)
37 files changed:
MANIFEST
Porting/Maintainers.pl
cpan/ExtUtils-MakeMaker/Changes
cpan/ExtUtils-MakeMaker/MANIFEST
cpan/ExtUtils-MakeMaker/README.packaging [new file with mode: 0644]
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm
cpan/ExtUtils-MakeMaker/t/MM_Win32.t
cpan/ExtUtils-MakeMaker/t/echo.t
cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm
pod/perldelta.pod

index 19eab08..f4a5644 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1046,6 +1046,7 @@ cpan/ExtUtils-MakeMaker/MANIFEST                          ExtUtils::MakeMaker MANIFEST
 cpan/ExtUtils-MakeMaker/NOTES                                  Notes about MakeMaker internals
 cpan/ExtUtils-MakeMaker/PATCHING                               Suggestions for patching MakeMaker
 cpan/ExtUtils-MakeMaker/README                                 MakeMaker README
+cpan/ExtUtils-MakeMaker/README.packaging                       MakeMaker packaging README
 cpan/ExtUtils-MakeMaker/t/00compile.t                          See if MakeMaker modules compile
 cpan/ExtUtils-MakeMaker/t/arch_check.t                         Test MakeMaker's arch_check()
 cpan/ExtUtils-MakeMaker/t/backwards.t                          Check MakeMaker's backwards compatibility
index 4735921..3b0da5a 100755 (executable)
@@ -734,7 +734,7 @@ use File::Glob qw(:case);
     'ExtUtils::MakeMaker' =>
        {
        'MAINTAINER'    => 'mschwern',
-       'DISTRIBUTION'  => 'MSCHWERN/ExtUtils-MakeMaker-6.63_01.tar.gz',
+       'DISTRIBUTION'  => 'MSCHWERN/ExtUtils-MakeMaker-6.63_02.tar.gz',
        'FILES'         => q[cpan/ExtUtils-MakeMaker],
        'EXCLUDED'      => [ qr{^t/lib/Test/},
            qr{^(bundled|my)/},
index 27910e6..d30b858 100644 (file)
@@ -1,3 +1,29 @@
+6.63_02  Tue Nov  1 17:02:40 PDT 2011
+    Test Fixes
+    * Inform BSDPAN (on FreeBSD) to not register modules installed while
+      testing. [rt.cpan.org 70232]
+    * Fix t/echo.t test on Win32. [rt.cpan.org 72097]
+    * Fix t/echo.t test on VMS. (Craig A. Berry)
+    * Fix t/Win32.t to handle the change to init_others(). [rt.cpan.org 72096]
+
+    Bug Fixes
+    * Fix VMS's echo() for the interface changes. (Craig A. Berry)
+    * Fix VMS's dollar sign escaping. (Craig A. Berry)
+
+    Misc
+    * my::bundle::copy_bundles() will only load File::Copy::Recursive if
+      it needs it, allowing vendors packaging MakeMaker to just delete
+      bundled/*
+    * Bundling can be overridden by setting the BUILDING_AS_PACKAGE
+      environment variable.  This makes life easier for vendor packagers.
+    * Stripped the Windows newlines off Parse::CPAN::Meta to avoid
+      confusing old versions of Module::Signature.
+
+    Docs
+    * README.packaging explains how to package MakeMaker
+    * bundled/README explains what the bundled directory is about.
+    
+
 6.63_01  Sun Oct 23 16:57:24 PDT 2011
     Bug Fixes
     * Stray $ in the PPD and meta files (for example, from the ABSTRACT)
index e42011b..fe47e55 100644 (file)
@@ -19,6 +19,7 @@ bundled/JSON-PP-Compat5006/JSON/PP/Compat5006.pm
 bundled/JSON-PP/JSON/PP.pm
 bundled/JSON-PP/JSON/PP/Boolean.pm
 bundled/Parse-CPAN-Meta/Parse/CPAN/Meta.pm
+bundled/README
 bundled/Scalar-List-Utils/List/Util.pm
 bundled/Scalar-List-Utils/List/Util/PP.pm
 bundled/Scalar-List-Utils/Scalar/Util.pm
@@ -65,6 +66,7 @@ my/bundles.pm
 NOTES
 PATCHING
 README
+README.packaging
 t/00compile.t
 t/arch_check.t
 t/backwards.t
diff --git a/cpan/ExtUtils-MakeMaker/README.packaging b/cpan/ExtUtils-MakeMaker/README.packaging
new file mode 100644 (file)
index 0000000..2e2d295
--- /dev/null
@@ -0,0 +1,23 @@
+If you wish to package MakeMaker in a binary package, here's some tips.
+
+tl;dr version:
+
+1a) Set the BUILDING_AS_PACKAGE environment variable to a true value.
+OR
+1b) Set the $BUILDING_AS_PACKAGE variable in the Makefile.PL to true.
+2)  Package normally, but watch out for dependency loops.
+
+MakeMaker cannot have any dependencies, everything depends on it and
+that would be a dependency loop.  It instead bundles pre-built copies
+of all its non-core dependencies in the bundled/ directory.  It adds
+them to itself if they're not already installed.
+
+This can confuse packagers, it makes it look like MakeMaker contains a
+lot more modules than it really does and causes conflicts.
+
+You can tell MakeMaker not to use it's bundles and instead declare the
+dependencies normally.  This is done either by setting the
+BUILDING_AS_PACKAGE environment variable to true or by patching the
+Makefile.PL and setting $BUILDING_AS_PACKAGE to true.  On the down
+side, there will be dependency loops which your packaging system will
+have to resolve.
index b38bfc3..8d82ee4 100644 (file)
@@ -10,7 +10,7 @@ our @ISA = qw(Exporter);
 
 our @EXPORT  = qw(test_harness pod2man perllocal_install uninstall 
                   warn_if_old_packlist);
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 my $Is_VMS = $^O eq 'VMS';
 
index b8a6c91..a2ef426 100644 (file)
@@ -2,7 +2,7 @@ package ExtUtils::Liblist;
 
 use strict;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 use File::Spec;
 require ExtUtils::Liblist::Kid;
index 6b7d9fe..eddcc72 100644 (file)
@@ -11,7 +11,7 @@ use 5.006;
 
 use strict;
 use warnings;
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 use ExtUtils::MakeMaker::Config;
 use Cwd 'cwd';
index 83fbe1c..418eb19 100644 (file)
@@ -3,7 +3,7 @@ package ExtUtils::MM;
 use strict;
 use ExtUtils::MakeMaker::Config;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 require ExtUtils::Liblist;
 require ExtUtils::MakeMaker;
index c9cf24f..0b0547f 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::MM_AIX;
 
 use strict;
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
index 7791107..fd85612 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::MM_Any;
 
 use strict;
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 use Carp;
 use File::Spec;
index 65250c3..a31cf23 100644 (file)
@@ -26,7 +26,7 @@ require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
 
 our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 
 =item os_flavor
index 6586d82..de6f130 100644 (file)
@@ -9,7 +9,7 @@ require ExtUtils::MM_Unix;
 require ExtUtils::MM_Win32;
 our @ISA = qw( ExtUtils::MM_Unix );
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 
 =head1 NAME
index 105023c..d902038 100644 (file)
@@ -2,7 +2,7 @@ package ExtUtils::MM_DOS;
 
 use strict;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
index ab41435..6d78157 100644 (file)
@@ -7,7 +7,7 @@ BEGIN {
     our @ISA = qw( ExtUtils::MM_Unix );
 }
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 
 =head1 NAME
index dbb26af..17bcde7 100644 (file)
@@ -2,7 +2,7 @@ package ExtUtils::MM_MacOS;
 
 use strict;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 sub new {
     die <<'UNSUPPORTED';
index e225096..be1e155 100644 (file)
@@ -22,7 +22,7 @@ use strict;
 use ExtUtils::MakeMaker::Config;
 use File::Basename;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 require ExtUtils::MM_Win32;
 our @ISA = qw(ExtUtils::MM_Win32);
index a07a4fb..f4ebd1e 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use ExtUtils::MakeMaker qw(neatvalue);
 use File::Spec;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
index 0d314eb..9d1f292 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::MM_QNX;
 
 use strict;
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
index d2932f1..d4b9370 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::MM_UWIN;
 
 use strict;
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
index a445828..b537393 100644 (file)
@@ -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.63_01';
+$VERSION = '6.63_02';
 $VERSION = eval $VERSION;
 
 require ExtUtils::MM_Any;
index a63a2a1..c204abc 100644 (file)
@@ -15,7 +15,7 @@ BEGIN {
 
 use File::Basename;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
@@ -1771,13 +1771,21 @@ native Write command instead.  Besides, its faster.
 =cut
 
 sub echo {
-    my($self, $text, $file, $appending) = @_;
-    $appending ||= 0;
+    my($self, $text, $file, $opts) = @_;
 
-    my $opencmd = $appending ? 'Open/Append' : 'Open/Write';
+    # Compatibility with old options
+    if( !ref $opts ) {
+        my $append = $opts;
+        $opts = { append => $append || 0 };
+    }
+    my $opencmd = $opts->{append} ? 'Open/Append' : 'Open/Write';
+
+    $opts->{allow_variables} = 0 unless defined $opts->{allow_variables};
+
+    my $ql_opts = { allow_variables => $opts->{allow_variables} };
 
     my @cmds = ("\$(NOECHO) $opencmd MMECHOFILE $file ");
-    push @cmds, map { '$(NOECHO) Write MMECHOFILE '.$self->quote_literal($_) } 
+    push @cmds, map { '$(NOECHO) Write MMECHOFILE '.$self->quote_literal($_, $ql_opts) } 
                 split /\n/, $text;
     push @cmds, '$(NOECHO) Close MMECHOFILE';
     return @cmds;
@@ -1801,6 +1809,37 @@ sub quote_literal {
     return qq{"$text"};
 }
 
+=item escape_dollarsigns
+
+Quote, don't escape.
+
+=cut
+
+sub escape_dollarsigns {
+    my($self, $text) = @_;
+
+    # Quote dollar signs which are not starting a variable
+    $text =~ s{\$ (?!\() }{"\$"}gx;
+
+    return $text;
+}
+
+
+=item escape_all_dollarsigns
+
+Quote, don't escape.
+
+=cut
+
+sub escape_all_dollarsigns {
+    my($self, $text) = @_;
+
+    # Quote dollar signs
+    $text =~ s{\$}{"\$\"}gx;
+
+    return $text;
+}
+
 =item escape_newlines
 
 =cut
index 7afc0db..cdc6659 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::MM_VOS;
 
 use strict;
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
index 4592b1e..43ae9a4 100644 (file)
@@ -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.63_01';
+our $VERSION = '6.63_02';
 
 $ENV{EMXSHELL} = 'sh'; # to run `commands`
 
index 67ca842..694655c 100644 (file)
@@ -2,7 +2,7 @@ package ExtUtils::MM_Win95;
 
 use strict;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 require ExtUtils::MM_Win32;
 our @ISA = qw(ExtUtils::MM_Win32);
index 7051e37..92d4da0 100644 (file)
@@ -3,7 +3,7 @@ package ExtUtils::MY;
 use strict;
 require ExtUtils::MM;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 our @ISA = qw(ExtUtils::MM);
 
 {
index 4f45b4b..3885ab0 100644 (file)
@@ -18,7 +18,7 @@ our @Overridable;
 my @Prepend_parent;
 my %Recognized_Att_Keys;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 $VERSION = eval $VERSION;
 
 # Emulate something resembling CVS $Revision$
index b354727..872f8c1 100644 (file)
@@ -2,7 +2,7 @@ package ExtUtils::MakeMaker::Config;
 
 use strict;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 use Config ();
 
index 7b51bf7..675c95f 100644 (file)
@@ -1,6 +1,6 @@
 package ExtUtils::MakeMaker::FAQ;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 1;
 __END__
index 72884a6..5120271 100644 (file)
@@ -1,6 +1,6 @@
 package ExtUtils::MakeMaker::Tutorial;
 
-our $VERSION = 6.63_01;
+our $VERSION = 6.63_02;
 
 
 =head1 NAME
index 1b8fc20..b5f19ea 100644 (file)
@@ -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.63_01';
+our $VERSION = '6.63_02';
 
 require Exporter;
 our @ISA = ('Exporter');
index 495424e..f086085 100644 (file)
@@ -10,7 +10,7 @@ use Config;
 
 our @ISA = qw(Exporter);
 our @EXPORT = qw(&Mksymlists);
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 sub Mksymlists {
     my(%spec) = @_;
index 3b48232..44832ee 100644 (file)
@@ -3,7 +3,7 @@ package ExtUtils::testlib;
 use strict;
 use warnings;
 
-our $VERSION = '6.63_01';
+our $VERSION = '6.63_02';
 
 use Cwd;
 use File::Spec;
index 44a01e3..4bc030d 100644 (file)
@@ -9,11 +9,9 @@ use strict;
 use Test::More;
 
 BEGIN {
-       if ($^O =~ /MSWin32/i) {
-               plan tests => 61;
-       } else {
-               plan skip_all => 'This is not Win32';
-       }
+    if ($^O !~ /MSWin32/i) {
+        plan skip_all => 'This is not Win32';
+    }
 }
 
 use Config;
@@ -104,13 +102,20 @@ delete $ENV{PATHEXT} unless $had_pathext;
         'catfile() eq File::Spec->catfile()' );
 }
 
-# init_others(): check if all keys are created and set?
-# qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP TEST_F LD AR LDLOADLIBS DEV_NUL )
-{
+# init_tools(): check if all keys are created and set?
+note "init_tools creates expected keys"; {
+    my $mm_w32 = bless( { BASEEXT => 'Foo', MAKE => $Config{make} }, 'MM' );
+    $mm_w32->init_tools();
+    my @keys = qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP NOECHO ECHO ECHO_N TEST_F DEV_NULL );
+    for my $key ( @keys ) {
+        ok( $mm_w32->{ $key }, "init_tools: $key" );
+    }
+}
+
+note "init_others creates expected keys"; {
     my $mm_w32 = bless( { BASEEXT => 'Foo', MAKE => $Config{make} }, 'MM' );
     $mm_w32->init_others();
-    my @keys = qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP 
-                   TEST_F LD AR LDLOADLIBS DEV_NULL );
+    my @keys = qw( LD AR LDLOADLIBS );
     for my $key ( @keys ) {
         ok( $mm_w32->{ $key }, "init_others: $key" );
     }
@@ -185,7 +190,7 @@ delete $ENV{PATHEXT} unless $had_pathext;
 {
     my $path = 'c:\\Program Files/SomeApp\\Progje.exe';
     is( $MM->canonpath( $path ), File::Spec->canonpath( $path ),
-           'canonpath() eq File::Spec->canonpath' );
+        'canonpath() eq File::Spec->canonpath' );
 }
 
 # perl_script()
@@ -235,28 +240,28 @@ unlink "${script_name}$script_ext" if -f "${script_name}$script_ext";
     SKIP: {
         skip("Not using 'nmake'", 2) unless $Config{make} eq 'nmake';
         ok(   $MM->is_make_type('nmake'), '->is_make_type(nmake) true'  );
-       ok( ! $MM->is_make_type('dmake'), '->is_make_type(dmake) false' );
+        ok( ! $MM->is_make_type('dmake'), '->is_make_type(dmake) false' );
     }
 
     # Check for literal nmake
     SKIP: {
         skip("Not using /nmake/", 2) unless $Config{make} =~ /nmake/;
         ok(   $MM->is_make_type('nmake'), '->is_make_type(nmake) true'  );
-       ok( ! $MM->is_make_type('dmake'), '->is_make_type(dmake) false' );
+        ok( ! $MM->is_make_type('dmake'), '->is_make_type(dmake) false' );
     }
 
     # Check for literal dmake
     SKIP: {
         skip("Not using 'dmake'", 2) unless $Config{make} eq 'dmake';
         ok(   $MM->is_make_type('dmake'), '->is_make_type(dmake) true'  );
-       ok( ! $MM->is_make_type('nmake'), '->is_make_type(nmake) false' );
+        ok( ! $MM->is_make_type('nmake'), '->is_make_type(nmake) false' );
     }
 
     # Check for literal dmake
     SKIP: {
         skip("Not using /dmake/", 2) unless $Config{make} =~ /dmake/;
         ok(   $MM->is_make_type('dmake'), '->is_make_type(dmake) true'  );
-       ok( ! $MM->is_make_type('nmake'), '->is_make_type(nmake) false' );
+        ok( ! $MM->is_make_type('nmake'), '->is_make_type(nmake) false' );
     }
 
 }
@@ -275,128 +280,108 @@ unlink "${script_name}$script_ext" if -f "${script_name}$script_ext";
 
 # _identify_compiler_environment()
 {
-       sub _run_cc_id {
-               my ( $config ) = @_;
-
-               $config->{cc} ||= '';
-
-               my @cc_env = ExtUtils::MM_Win32::_identify_compiler_environment( $config );
-
-               my %cc_env = ( BORLAND => $cc_env[0], GCC => $cc_env[1], DLLTOOL => $cc_env[2] );
-
-               return \%cc_env;
-       }
-
-       sub _check_cc_id_value {
-               my ( $test ) = @_;
-
-               my $res = _run_cc_id( $test->{config} );
-
-               fail( "unknown key '$test->{key}'" ) if !exists $res->{$test->{key}};
-               my $val = $res->{$test->{key}};
-
-               is( $val, $test->{expect}, $test->{desc} );
-
-               return;
-       }
-
-       my @tests = (
-               {
-                       config => {},
-                       key => 'DLLTOOL', expect => 'dlltool',
-                       desc => 'empty dlltool defaults to "dlltool"',
-               },
-               {
-                       config => { dlltool => 'test' },
-                       key => 'DLLTOOL', expect => 'test',
-                       desc => 'dlltool value is taken over verbatim from %Config, if set',
-               },
-               {
-                       config => {},
-                       key => 'GCC', expect => 0,
-                       desc => 'empty cc is not recognized as gcc',
-               },
-               {
-                       config => { cc => 'gcc' },
-                       key => 'GCC', expect => 1,
-                       desc => 'plain "gcc" is recognized',
-               },
-               {
-                       config => { cc => 'C:/MinGW/bin/gcc.exe' },
-                       key => 'GCC', expect => 1,
-                       desc => 'fully qualified "gcc" is recognized',
-               },
-               {
-                       config => { cc => 'C:/MinGW/bin/gcc-1.exe' },
-                       key => 'GCC', expect => 1,
-                       desc => 'dash-extended gcc is recognized',
-               },
-               {
-                       config => { cc => 'C:/MinGW/bin/gcc_1.exe' },
-                       key => 'GCC', expect => 0,
-                       desc => 'underscore-extended gcc is not recognized',
-               },
-               {
-                       config => {},
-                       key => 'BORLAND', expect => 0,
-                       desc => 'empty cc is not recognized as borland',
-               },
-               {
-                       config => { cc => 'bcc' },
-                       key => 'BORLAND', expect => 1,
-                       desc => 'plain "bcc" is recognized',
-               },
-               {
-                       config => { cc => 'C:/Borland/bin/bcc.exe' },
-                       key => 'BORLAND', expect => 0,
-                       desc => 'fully qualified borland cc is not recognized',
-               },
-               {
-                       config => { cc => 'bcc-1.exe' },
-                       key => 'BORLAND', expect => 1,
-                       desc => 'dash-extended borland cc is recognized',
-               },
-               {
-                       config => { cc => 'bcc_1.exe' },
-                       key => 'BORLAND', expect => 1,
-                       desc => 'underscore-extended borland cc is recognized',
-               },
-       );
-
-       _check_cc_id_value($_) for @tests;
+    sub _run_cc_id {
+        my ( $config ) = @_;
 
-}
+        $config->{cc} ||= '';
 
-package FakeOut;
+        my @cc_env = ExtUtils::MM_Win32::_identify_compiler_environment( $config );
 
-sub TIEHANDLE {
-       bless(\(my $scalar), $_[0]);
-}
+        my %cc_env = ( BORLAND => $cc_env[0], GCC => $cc_env[1], DLLTOOL => $cc_env[2] );
 
-sub PRINT {
-       my $self = shift;
-       $$self .= shift;
-}
+        return \%cc_env;
+    }
 
-__END__
+    sub _check_cc_id_value {
+        my ( $test ) = @_;
 
-=head1 NAME
+        my $res = _run_cc_id( $test->{config} );
 
-MM_Win32.t - Tests for ExtUtils::MM_Win32
+        fail( "unknown key '$test->{key}'" ) if !exists $res->{$test->{key}};
+        my $val = $res->{$test->{key}};
 
-=head1 TODO
+        is( $val, $test->{expect}, $test->{desc} );
 
- - Methods to still be checked:
- # static_lib() should look into that
- # dynamic_bs() should look into that
- # dynamic_lib() should look into that
- # xs_o() should look into that
- # top_targets() should look into that
- # dist_ci() should look into that
- # dist_core() should look into that
+        return;
+    }
 
-=head1 AUTHOR
+    my @tests = (
+        {
+            config => {},
+            key => 'DLLTOOL', expect => 'dlltool',
+            desc => 'empty dlltool defaults to "dlltool"',
+        },
+        {
+            config => { dlltool => 'test' },
+            key => 'DLLTOOL', expect => 'test',
+            desc => 'dlltool value is taken over verbatim from %Config, if set',
+        },
+        {
+            config => {},
+            key => 'GCC', expect => 0,
+            desc => 'empty cc is not recognized as gcc',
+        },
+        {
+            config => { cc => 'gcc' },
+            key => 'GCC', expect => 1,
+            desc => 'plain "gcc" is recognized',
+        },
+        {
+            config => { cc => 'C:/MinGW/bin/gcc.exe' },
+            key => 'GCC', expect => 1,
+            desc => 'fully qualified "gcc" is recognized',
+        },
+        {
+            config => { cc => 'C:/MinGW/bin/gcc-1.exe' },
+            key => 'GCC', expect => 1,
+            desc => 'dash-extended gcc is recognized',
+        },
+        {
+            config => { cc => 'C:/MinGW/bin/gcc_1.exe' },
+            key => 'GCC', expect => 0,
+            desc => 'underscore-extended gcc is not recognized',
+        },
+        {
+            config => {},
+            key => 'BORLAND', expect => 0,
+            desc => 'empty cc is not recognized as borland',
+        },
+        {
+            config => { cc => 'bcc' },
+            key => 'BORLAND', expect => 1,
+            desc => 'plain "bcc" is recognized',
+        },
+        {
+            config => { cc => 'C:/Borland/bin/bcc.exe' },
+            key => 'BORLAND', expect => 0,
+            desc => 'fully qualified borland cc is not recognized',
+        },
+        {
+            config => { cc => 'bcc-1.exe' },
+            key => 'BORLAND', expect => 1,
+            desc => 'dash-extended borland cc is recognized',
+        },
+        {
+            config => { cc => 'bcc_1.exe' },
+            key => 'BORLAND', expect => 1,
+            desc => 'underscore-extended borland cc is recognized',
+        },
+    );
+
+    _check_cc_id_value($_) for @tests;
+}
 
-20011228 Abe Timmerman <abe@ztreet.demon.nl>
 
-=cut
+done_testing;
+
+
+package FakeOut;
+
+sub TIEHANDLE {
+    bless(\(my $scalar), $_[0]);
+}
+
+sub PRINT {
+    my $self = shift;
+    $$self .= shift;
+}
index a4ef9c7..04fcc43 100644 (file)
@@ -22,9 +22,13 @@ use Test::More;
 my $cwd  = abs_path;
 my $perl = which_perl;
 my $make = make_run();
-my $mm = bless { NAME => "Foo", MAKE => $Config{make} }, "MM";
+my $mm = bless { NAME => "Foo", MAKE => $Config{make}, PARENT_NAME => '' }, "MM";
+$mm->init_INST;   # *PERLRUN needs INIT_*
+$mm->init_PERL;   # generic ECHO needs ABSPERLRUN
 $mm->init_tools;  # need ECHO
 
+# Run Perl with the currently installing MakeMaker
+$mm->{$_} .= q[ "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"] for qw( PERLRUN FULLPERLRUN ABSPERLRUN );
 
 #------------------- Testing functions
 
@@ -42,8 +46,12 @@ sub test_for_echo {
     {
         open my $makefh, ">", "Makefile" or croak "Can't open Makefile: $!";
         print $makefh "FOO=42\n";       # a variable to test with
-        print $makefh "ECHO=$mm->{ECHO}\n\n";
-        print $makefh "all:\n";
+
+        for my $key (qw(INST_ARCHLIB INST_LIB PERL ABSPERL ABSPERLRUN ECHO)) {
+            print $makefh "$key=$mm->{$key}\n";
+        }
+
+        print $makefh "all :\n";
         for my $args (@$calls) {
             print $makefh map { "\t$_\n" } $mm->echo(@$args);
         }
index b4e4504..9a6ab60 100644 (file)
@@ -7,8 +7,9 @@ use Config;
 require Exporter;
 our @ISA = qw(Exporter);
 
-our $Is_VMS   = $^O eq 'VMS';
-our $Is_MacOS = $^O eq 'MacOS';
+our $Is_VMS     = $^O eq 'VMS';
+our $Is_MacOS   = $^O eq 'MacOS';
+our $Is_FreeBSD = $^O eq 'freebsd';
 
 our @EXPORT = qw(which_perl perl_lib makefile_name makefile_backup
                  make make_run run make_macro calibrate_mtime
@@ -32,11 +33,20 @@ our @EXPORT = qw(which_perl perl_lib makefile_name makefile_backup
         MAKEFLAGS
     );
 
+    my %default_env_keys;
+
+    # Inform the BSDPAN hacks not to register modules installed for testing.
+    $default_env_keys{PORTOBJFORMAT} = 1 if $Is_FreeBSD;
+
     # Remember the ENV values because on VMS %ENV is global
     # to the user, not the process.
     my %restore_env_keys;
 
     sub clean_env {
+        for my $key (keys %default_env_keys) {
+            $ENV{$key} = $default_env_keys{$key} unless $ENV{$key};
+        }
+
         for my $key (@delete_env_keys) {
             if( exists $ENV{$key} ) {
                 $restore_env_keys{$key} = delete $ENV{$key};
index 4db3a02..1bba670 100644 (file)
@@ -127,7 +127,7 @@ L<CPANPLUS::Dist::Build> has been upgraded from version 0.58 to version 0.60.
 
 =item *
 
-L<ExtUtils::MakeMaker> has been upgraded from version 6.61_01 to version 6.63_01.
+L<ExtUtils::MakeMaker> has been upgraded from version 6.61_01 to version 6.63_02.
 
 =item *