Here's a patch to sync up bleadperl with MakeMaker 5.48_03.  On the
way we also fix the hints.t problem. :) Its much smaller than it
looks.  The bulk of it is rote adaptions of the test suite to CPAN
life, stripping of CVS $Revision$ based $VERSION numbers (which don't
work out since my local CVS has completely different numbers) and
backporting to 5.6.1.

Here's the blow-by-blow.

General

    Added a Changes file.  (The warning about non-Unix platforms
    being untested applies to the 5.6.1 backporting)

    The mysterious inst has been renamed instmodsh.  Eventually it
    should be moved into utils/ and installed normally.

    All $Revison$ based $VERSIONs have been made static.

    Stripped out per-file change comments.  They just fall out of date
    (sorry Tels).  CVS logs will take their place.

General tests

    Tests have been adapted for CPAN.  This idiom:

        BEGIN {
            if( $ENV{PERL_CORE} ) {
                chdir 't';
                @INC = ('../lib', 'lib/');
            }
            else {
                unshift @INC, 't/lib/';
            }
        }
        chdir 't';

    is so the same test will work in both CPAN and on the core.
    Makes these syncs much, much easier.  I'm not totally pleased
    with it.  Alternatives?

    Tests changed from #!./perl to #!/usr/bin/perl for CPAN life.
    Shouldn't really make a difference.

    use vars qw( $Someone::Elses::Var ) was often used to quell
    'used only once' warnings.  Had to junk this for backporting.
    Back to ad hockery.

    chromatic's TieOut testing utility has been pulled out into its
    own module and placed into t/lib to avoid having to copy it around.

MM_Win32.pm

    Squelched many warnings.  Still a bunch left.  Some are related
    to the fact that MM_Win32.t creates dummy MM objects.  It does
    this because there is no simple way to init an MM object without
    it doing all sorts of other work.  Its in the TODO.

    Had %INC keys with Windows-style paths.  %INC is always Unixy.
    As a result MAKEMAKER wasn't being set.

    Little reformatting of a overlong comment.

MakeMaker.pm

    Nick found a little formatting glitch in the prereq check message.

    "Processing hints file" diag now goes to STDERR.

Mkbootstrap.pm

    SYNOPSIS refered to it as 'mkbootstrap'.

    This thing needs better docs.

testlib.pm

    Declared obsolete in favor of blib.pm.  blib's main advantage is it
    uses absolute paths.  *Not* making testlib a blib wrapper because
    5.6.1's blib is noisy.

Command.t

    File::Path isn't taint clean in 5.6.1, had to turn off -T.

ExtUtils.t

    -x doesn't seem to work on Win32/5.6.1.  Had to write some helper
    code to get around that.

MM_Win32.t

    MakeMaker mimicry unnecessary.  Just use MakeMaker and it'll do it
    for you.

    Hacks to squelch some warnings due to a lack of a proper init
    method.  Further squelching stopped in favor of just writing
    an init method (todo).

    Reflecting %INC fix

Packlist.t

    Little bug in the skip, was doing "unless %hash" instead of
    "unless keys %hash"

hints.t

    Trapping the "Processing hint" diagnostic to make t/TEST happy.


--- /var/local/bleadperl/MANIFEST       Thu Jan 17 20:39:51 2002
+++ ./MANIFEST  Fri Jan 18 02:39:13 2002
@@ -931,10 +931,11 @@
 lib/Exporter.pm                        Exporter base class
 lib/Exporter.t                 See if Exporter works
 lib/Exporter/Heavy.pm          Complicated routines for Exporter
+lib/ExtUtils/Changes            MakeMaker change log
 lib/ExtUtils/Command.pm                Utilities for Make on non-UNIX platforms
 lib/ExtUtils/Constant.pm       generate XS code to import C header constants
 lib/ExtUtils/Embed.pm          Utilities for embedding Perl in C programs
-lib/ExtUtils/inst              Give information about installed extensions
+lib/ExtUtils/instmodsh         Give information about installed extensions
 lib/ExtUtils/Install.pm                Handles 'make install' on extensions
 lib/ExtUtils/Installed.pm      Information on installed extensions
 lib/ExtUtils/Liblist.pm                Locates libraries
@@ -2154,6 +2155,7 @@
 t/lib/Test/Simple/sample_tests/success.plx              for exit.t
 t/lib/Test/Simple/sample_tests/too_few.plx              for exit.t
 t/lib/Test/Simple/sample_tests/two_fail.plx             for exit.t
+t/lib/TieOut.pm                 Testing library to capture prints
 t/lib/warnings/1global         Tests of global warnings for warnings.t
 t/lib/warnings/2use            Tests for "use warnings" for warnings.t
 t/lib/warnings/3both           Tests for interaction of $^W and "use warnings"
--- /var/local/bleadperl/lib/ExtUtils/Embed.pm  Sun Nov 25 16:03:20 2001
+++ ./lib/ExtUtils/Embed.pm     Fri Jan 18 02:35:26 2002
@@ -1,4 +1,4 @@
-# $Id: Embed.pm,v 1.2501 $
+# $Id: Embed.pm,v 1.1.1.1 2002/01/16 19:27:19 schwern Exp $
 require 5.002;
 
 package ExtUtils::Embed;
@@ -18,7 +18,7 @@
            );
 use strict;
 
-$VERSION = sprintf("%d.%02d", q$Revision: 1.2506_00 $ =~ /(\d+)\.(\d+)/);
+$VERSION = 1.2506_01;
 
 @ISA = qw(Exporter);
 @EXPORT = qw(&xsinit &ldopts 
diff -ru /var/local/bleadperl/lib/ExtUtils/Liblist.pm ./lib/ExtUtils/Liblist.pm
--- /var/local/bleadperl/lib/ExtUtils/Liblist.pm        Sun Dec  9 17:15:19 2001
+++ ./lib/ExtUtils/Liblist.pm   Fri Jan 18 02:35:26 2002
@@ -24,7 +24,7 @@
 use 5.006_001;
 # Broken out of MakeMaker from version 4.11
 
-our $VERSION = substr q$Revision: 1.27 $, 10;
+our $VERSION = 1.27_01;
 
 use Config;
 use Cwd 'cwd';
diff -ru /var/local/bleadperl/lib/ExtUtils/MM_Win32.pm ./lib/ExtUtils/MM_Win32.pm
--- /var/local/bleadperl/lib/ExtUtils/MM_Win32.pm       Mon Dec 24 19:05:18 2001
+++ ./lib/ExtUtils/MM_Win32.pm  Fri Jan 18 02:35:26 2002
@@ -1,6 +1,6 @@
 package ExtUtils::MM_Win32;
 
-our $VERSION = '1.00';
+our $VERSION = '1.00_02';
 
 =head1 NAME
 
@@ -144,6 +144,8 @@
 
 sub find_perl {
     my($self, $ver, $names, $dirs, $trace) = @_;
+    $trace ||= 0;
+
     my($name, $dir);
     if ($trace >= 2){
        print "Looking for perl $ver by these names:
@@ -263,7 +265,7 @@
 };
 
     push @m, qq{
-MAKEMAKER = $INC{'ExtUtils\MakeMaker.pm'}
+MAKEMAKER = $INC{'ExtUtils/MakeMaker.pm'}
 MM_VERSION = $ExtUtils::MakeMaker::VERSION
 };
 
@@ -322,10 +324,10 @@
 
 .SUFFIXES: .xs .c .C .cpp .cxx .cc \$(OBJ_EXT)
 
-# Nick wanted to get rid of .PRECIOUS. I don't remember why. I seem to recall, that
-# some make implementations will delete the Makefile when we rebuild it. Because
-# we call false(1) when we rebuild it. So make(1) is not completely wrong when it
-# does so. Our milage may vary.
+# Nick wanted to get rid of .PRECIOUS. I don't remember why. I seem to 
+# recall, that some make implementations will delete the Makefile when we 
+# rebuild it. Because we call false(1) when we rebuild it. So make(1) is 
+# not completely wrong when it does so. Our milage may vary.
 # .PRECIOUS: Makefile    # seems to be not necessary anymore
 
 .PHONY: all config static dynamic test linkext manifest
diff -ru /var/local/bleadperl/lib/ExtUtils/MakeMaker.pm ./lib/ExtUtils/MakeMaker.pm
--- /var/local/bleadperl/lib/ExtUtils/MakeMaker.pm      Thu Jan 17 20:24:47 2002
+++ ./lib/ExtUtils/MakeMaker.pm Fri Jan 18 02:35:26 2002
@@ -2,10 +2,10 @@
 
 package ExtUtils::MakeMaker;
 
-$VERSION = "5.48";
+$VERSION = "5.48_03";
 $Version_OK = "5.17";  # Makefiles older than $Version_OK will die
                        # (Will be checked from MakeMaker version 4.13 onwards)
-($Revision = substr(q$Revision: 1.222 $, 10)) =~ s/\s+$//;
+($Revision = substr(q$Revision: 1.4 $, 10)) =~ s/\s+$//;
 
 
 
@@ -349,7 +349,7 @@
            warn "Warning: prerequisite $prereq $self->{PREREQ_PM}->{$prereq} not 
found.\n" unless $self->{PREREQ_FATAL};
            $unsatisfied{$prereq} = 'not installed';
        } elsif ($prereq->VERSION < $self->{PREREQ_PM}->{$prereq} ){
-           warn "Warning: prerequisite $prereq $self->{PREREQ_PM}->{$prereq} not 
found. We have"
+           warn "Warning: prerequisite $prereq $self->{PREREQ_PM}->{$prereq} not 
+found. We have "
                . ($prereq->VERSION || 'unknown version') unless $self->{PREREQ_FATAL};
            $unsatisfied{$prereq} = $self->{PREREQ_PM}->{$prereq} ? 
$self->{PREREQ_PM}->{$prereq} : 'unknown version' ;
        }
@@ -681,14 +681,14 @@
     return unless -f $hint_file;    # really there
 
     # execute the hintsfile:
-    print STDOUT "Processing hints file $hint_file\n";
+    print STDERR "Processing hints file $hint_file\n";
     {
         local *HINT;
         open(HINT, $hint_file) || die "Can't open $hint_file: $!";
         eval join '', <HINT>;
         close HINT;
     }
-    print STDOUT $@ if $@;
+    print STDERR $@ if $@;
 }
 
 sub mv_all_methods {
@@ -1857,7 +1857,7 @@
 
     $VERSION = '1.00';
     *VERSION = \'1.01';
-    ( $VERSION ) = '$Revision: 1.222 $ ' =~ /\$Revision:\s+([^\s]+)/;
+    ( $VERSION ) = '$Revision: 1.4 $ ' =~ /\$Revision:\s+([^\s]+)/;
     $FOO::VERSION = '1.10';
     *FOO::VERSION = \'1.11';
     our $VERSION = 1.2.3;      # new for perl5.6.0 
--- /var/local/bleadperl/lib/ExtUtils/Manifest.pm       Mon Nov 19 09:52:07 2001
+++ ./lib/ExtUtils/Manifest.pm  Fri Jan 18 02:35:26 2002
@@ -12,7 +12,7 @@
            $Is_MacOS,$Is_VMS,
            $Debug,$Verbose,$Quiet,$MANIFEST,$found,$DEFAULT_MSKIP);
 
-$VERSION = substr(q$Revision: 1.35 $, 10);
+$VERSION = 1.35_00;
 @ISA=('Exporter');
 @EXPORT_OK = ('mkmanifest', 'manicheck', 'fullcheck', 'filecheck', 
              'skipcheck', 'maniread', 'manicopy');
--- /var/local/bleadperl/lib/ExtUtils/Mkbootstrap.pm    Mon Jul 31 22:31:47 2000
+++ ./lib/ExtUtils/Mkbootstrap.pm       Fri Jan 18 02:35:26 2002
@@ -1,7 +1,6 @@
 package ExtUtils::Mkbootstrap;
 
-$VERSION = substr q$Revision: 1.14 $, 10;
-# $Date: 1996/09/03 17:04:43 $
+$VERSION = 1.14_01;
 
 use Config;
 use Exporter;
@@ -75,7 +74,7 @@
 
 =head1 SYNOPSIS
 
-C<mkbootstrap>
+C<Mkbootstrap>
 
 =head1 DESCRIPTION
 
diff -ru /var/local/bleadperl/lib/ExtUtils/Mksymlists.pm ./lib/ExtUtils/Mksymlists.pm
--- /var/local/bleadperl/lib/ExtUtils/Mksymlists.pm     Fri Sep 21 14:11:58 2001
+++ ./lib/ExtUtils/Mksymlists.pm        Fri Jan 18 02:35:26 2002
@@ -10,7 +10,7 @@
 our(@ISA, @EXPORT, $VERSION);
 @ISA = 'Exporter';
 @EXPORT = '&Mksymlists';
-$VERSION = substr q$Revision: 1.18 $, 10;
+$VERSION = 1.18_00;
 
 sub Mksymlists {
     my(%spec) = @_;
--- /var/local/bleadperl/lib/ExtUtils/t/Command.t       Fri Jan 11 09:29:18 2002
+++ ./lib/ExtUtils/t/Command.t  Fri Jan 18 02:38:37 2002
@@ -1,9 +1,15 @@
-#!./perl -Tw
+#!/usr/bin/perl -w
 
 BEGIN {
-       chdir 't' if -d 't';
-       @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't';
+        @INC = ('../lib', 'lib/');
+    }
+    else {
+        unshift @INC, 't/lib/';
+    }
 }
+chdir 't';
 
 BEGIN {
        1 while unlink 'ecmdfile';
@@ -18,9 +24,8 @@
 }
 
 {
-       use vars qw( *CORE::GLOBAL::exit );
-
        # bad neighbor, but test_f() uses exit()
+    *CORE::GLOBAL::exit = '';   # quiet 'only once' warning.
        *CORE::GLOBAL::exit = sub { return @_ };
 
        use_ok( 'ExtUtils::Command' );
@@ -51,6 +56,7 @@
 
        # concatenate this file with itself
        # be extra careful the regex doesn't match itself
+    use TieOut;
        my $out = tie *STDOUT, 'TieOut';
        my $self = $0;
        unless (-f $self) {
@@ -148,14 +154,4 @@
 END {
        1 while unlink 'ecmdfile';
        File::Path::rmtree( 'ecmddir' );
-}
-
-package TieOut;
-
-sub TIEHANDLE {
-       bless( \(my $text), $_[0] );
-}
-
-sub PRINT {
-       ${ $_[0] } .= join($/, @_);
 }
diff -ru /var/local/bleadperl/lib/ExtUtils/t/Embed.t ./lib/ExtUtils/t/Embed.t
--- /var/local/bleadperl/lib/ExtUtils/t/Embed.t Thu Jan 10 15:38:46 2002
+++ ./lib/ExtUtils/t/Embed.t    Fri Jan 18 02:38:37 2002
@@ -1,9 +1,13 @@
-#!./perl
+#!/usr/bin/perl
 
 BEGIN {
-    chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
 }
+chdir 't';
+
 use Config;
 use ExtUtils::Embed;
 use File::Spec;
diff -ru /var/local/bleadperl/lib/ExtUtils/t/ExtUtils.t ./lib/ExtUtils/t/ExtUtils.t
--- /var/local/bleadperl/lib/ExtUtils/t/ExtUtils.t      Mon Dec 17 13:53:39 2001
+++ ./lib/ExtUtils/t/ExtUtils.t Fri Jan 18 02:38:37 2002
@@ -1,10 +1,12 @@
-#!./perl -w
+#!/usr/bin/perl -w
 
 print "1..27\n";
 
 BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
 }
 
 # use warnings;
@@ -23,7 +25,7 @@
 $^X = $perl;
 
 print "# perl=$perl\n";
-my $runperl = "$perl -x \"-I../../lib\"";
+my $runperl = "$perl \"-I../../lib\"";
 
 $| = 1;
 
@@ -447,15 +449,32 @@
   print "not ok $test # $maketest failed: $?\n";
   print "# $_" foreach @makeout;
 } else {
-  print "ok $test\n";
+  print "ok $test - maketest\n";
 }
 $test++;
 
-my $regen = `$runperl $package.xs`;
+
+# -x is busted on Win32 < 5.6.1, so we emulate it.
+my $regen;
+if( $^O eq 'MSWin32' && $] <= 5.006001 ) {
+    open(REGENTMP, ">regentmp") or die $!;
+    open(XS, "$package.xs")     or die $!;
+    my $saw_shebang;
+    while(<XS>) {
+        $saw_shebang++ if /^#!.*/i ;
+        print REGENTMP $_ if $saw_shebang;
+    }
+    close XS;  close REGENTMP;
+    $regen = `$runperl regentmp`;
+    unlink 'regentmp';
+}
+else {
+    $regen = `$runperl -x $package.xs`;
+}
 if ($?) {
-  print "not ok $test # $runperl $package.xs failed: $?\n";
+  print "not ok $test # $runperl -x $package.xs failed: $?\n";
 } else {
-  print "ok $test\n";
+  print "ok $test - regen\n";
 }
 $test++;
 
@@ -463,9 +482,9 @@
   "\n#### XS Section:\n" . $XS_constant;
 
 if ($expect eq $regen) {
-  print "ok $test\n";
+  print "ok $test - regen worked\n";
 } else {
-  print "not ok $test\n";
+  print "not ok $test - regen worked\n";
   # open FOO, ">expect"; print FOO $expect;
   # open FOO, ">regen"; print FOO $regen; close FOO;
 }
diff -ru /var/local/bleadperl/lib/ExtUtils/t/Installed.t ./lib/ExtUtils/t/Installed.t
--- /var/local/bleadperl/lib/ExtUtils/t/Installed.t     Tue Dec 18 10:10:08 2001
+++ ./lib/ExtUtils/t/Installed.t        Fri Jan 18 02:38:37 2002
@@ -1,4 +1,13 @@
-#!./perl
+#!/usr/bin/perl -w
+
+BEGIN {
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
+}
+chdir 't';
+
 
 use strict;
 use warnings;
@@ -13,14 +22,9 @@
 # for directories() tests
 use File::Basename;
 
-BEGIN {
-       chdir 't' if -d 't';
-       @INC = '../lib';
-}
-
 use Test::More tests => 43;
 
-use_ok( 'ExtUtils::Installed' );
+BEGIN { use_ok( 'ExtUtils::Installed' ) }
 
 # saves having to qualify package name for class methods
 my $ei = bless( {}, 'ExtUtils::Installed' );
@@ -56,7 +60,15 @@
 is( $ei->_is_under('baz', @under), 1, '... should find file under dir' );
 
 # new
-my $realei = ExtUtils::Installed->new();
+my $realei;
+{
+    # We're going to get warnings about not being able to find install
+    # directories if we're not installed.
+    local $SIG{__WARN__} = sub {
+        warn @_ unless $ENV{PERL_CORE} && $_[0] =~ /^Can't stat/;
+    };
+    $realei = ExtUtils::Installed->new();
+}
 
 isa_ok( $realei, 'ExtUtils::Installed' );
 isa_ok( $realei->{Perl}{packlist}, 'ExtUtils::Packlist' );
diff -ru /var/local/bleadperl/lib/ExtUtils/t/MM_BeOS.t ./lib/ExtUtils/t/MM_BeOS.t
--- /var/local/bleadperl/lib/ExtUtils/t/MM_BeOS.t       Tue Jan 15 13:16:34 2002
+++ ./lib/ExtUtils/t/MM_BeOS.t  Fri Jan 18 02:38:37 2002
@@ -1,13 +1,12 @@
-#!perl
-
-# 2001-01-14 Tels v0.01
-
-our $VERSION = 0.01;
+#!/usr/bin/perl
 
 BEGIN {
-       chdir 't' if -d 't';
-       @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
 }
+chdir 't';
 
 use Test::More;
 
diff -ru /var/local/bleadperl/lib/ExtUtils/t/MM_Cygwin.t ./lib/ExtUtils/t/MM_Cygwin.t
--- /var/local/bleadperl/lib/ExtUtils/t/MM_Cygwin.t     Thu Dec 27 09:42:14 2001
+++ ./lib/ExtUtils/t/MM_Cygwin.t        Fri Jan 18 02:38:37 2002
@@ -1,9 +1,12 @@
-#!./perl
+#!/usr/bin/perl
 
 BEGIN {
-       chdir 't' if -d 't';
-       @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
 }
+chdir 't';
 
 use Test::More;
 
diff -ru /var/local/bleadperl/lib/ExtUtils/t/MM_OS2.t ./lib/ExtUtils/t/MM_OS2.t
--- /var/local/bleadperl/lib/ExtUtils/t/MM_OS2.t        Thu Dec 20 21:40:18 2001
+++ ./lib/ExtUtils/t/MM_OS2.t   Fri Jan 18 02:38:37 2002
@@ -1,11 +1,14 @@
-#!./perl -w
+#!/usr/bin/perl -w
 
 use strict;
 
 BEGIN {
-       chdir 't' if -d 't';
-       @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
 }
+chdir 't';
 
 use Test::More;
 if ($^O =~ /os2/i) {
diff -ru /var/local/bleadperl/lib/ExtUtils/t/MM_Unix.t ./lib/ExtUtils/t/MM_Unix.t
--- /var/local/bleadperl/lib/ExtUtils/t/MM_Unix.t       Wed Jan 16 09:48:12 2002
+++ ./lib/ExtUtils/t/MM_Unix.t  Fri Jan 18 02:38:37 2002
@@ -1,14 +1,12 @@
-#!./perl -w
-
-# 2001-12-16 Tels first version
-# 2002-01-13 Tels 0.02 added some tests for various functions, added Andreas
-#                     fix to the version test (>= vs ==)
-# 2002-01-14 Tels 0.03 exclude on beos and netware, /i for $^O test
+#!/usr/bin/perl -w
 
 BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
 }
+chdir 't';
 
 BEGIN { 
     use Test::More; 
@@ -182,7 +180,8 @@
 ###############################################################################
 # parse_version
 
-my $self_name = '../lib/ExtUtils/t/MM_Unix.t';
+my $self_name = $ENV{PERL_CORE} ? '../lib/ExtUtils/t/MM_Unix.t' 
+                                : 'MM_Unix.t';
 
 is ($t->parse_version($self_name),'0.02',
   'parse_version on ourself');
diff -ru /var/local/bleadperl/lib/ExtUtils/t/MM_VMS.t ./lib/ExtUtils/t/MM_VMS.t
--- /var/local/bleadperl/lib/ExtUtils/t/MM_VMS.t        Mon Dec 17 13:53:39 2001
+++ ./lib/ExtUtils/t/MM_VMS.t   Fri Jan 18 02:38:37 2002
@@ -1,9 +1,12 @@
-#!./perl -w
+#!/usr/bin/perl -w
 
 BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
 }
+chdir 't';
 
 BEGIN {
     use Test::More;
diff -ru /var/local/bleadperl/lib/ExtUtils/t/MM_Win32.t ./lib/ExtUtils/t/MM_Win32.t
--- /var/local/bleadperl/lib/ExtUtils/t/MM_Win32.t      Sun Jan 13 20:33:54 2002
+++ ./lib/ExtUtils/t/MM_Win32.t Fri Jan 18 02:38:37 2002
@@ -1,9 +1,12 @@
-#!perl
+#!/usr/bin/perl
 
 BEGIN {
-       chdir 't' if -d 't';
-       @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
 }
+chdir 't';
 
 use Test::More;
 
@@ -18,23 +21,14 @@
 use Config;
 use File::Spec;
 use File::Basename;
-
-# Does this mimic ExtUtils::MakeMaker ok?
-{
-    @MM::ISA = qw(
-        ExtUtils::MM_Unix 
-        ExtUtils::Liblist::Kid 
-        ExtUtils::MakeMaker
-    );
-    # MM package faked up by messy MI entanglement
-    package MM;
-    sub DESTROY {}
-}
+use ExtUtils::MakeMaker;
 
 require_ok( 'ExtUtils::MM_Win32' );
 
 # test import of $Verbose and &neatvalue
 can_ok( 'MM', 'neatvalue' );
+() = $ExtUtils::MM_Win32::Verbose;
+() = $ExtUtils::MakeMaker::Verbose;
 is( $ExtUtils::MM_Win32::Verbose, $ExtUtils::MakeMaker::Verbose, 
        'ExtUtils::MM_Win32 should import $Verbose from ExtUtils::MakeMaker' );
 
@@ -126,12 +120,19 @@
         VERSION_FROM => 'TestMM_Win32',
         PM           => { 'MM_Win32.pm' => 1 },
     }, 'MM';
+
+    # XXX Hack until we have a proper init method.
+    # Flesh out some necessary keys in the MM object.
+    foreach my $key (qw(XS C O_FILES H HTMLLIBPODS HTMLSCRIPTPODS
+                        MAN1PODS MAN3PODS PARENT_NAME)) {
+        $mm_w32{$key} = '';
+    }
     my $s_PM = join( " \\\n\t", sort keys %{$mm_w32->{PM}} );
     my $k_PM = join( " \\\n\t", %{$mm_w32->{PM}} );
 
     like( $mm_w32->constants(),
           qr/^NAME\ =\ TestMM_Win32\s+VERSION\ =\ 1\.00.+
-             MAKEMAKER\ =\ $INC{'ExtUtils\MakeMaker.pm'}\s+
+             MAKEMAKER\ =\ $INC{'ExtUtils/MakeMaker.pm'}\s+
              MM_VERSION\ =\ $ExtUtils::MakeMaker::VERSION.+
              VERSION_FROM\ =\ TestMM_Win32.+
              TO_INST_PM\ =\ \Q$s_PM\E\s+
diff -ru /var/local/bleadperl/lib/ExtUtils/t/Manifest.t ./lib/ExtUtils/t/Manifest.t
--- /var/local/bleadperl/lib/ExtUtils/t/Manifest.t      Fri Jan 11 09:29:18 2002
+++ ./lib/ExtUtils/t/Manifest.t Fri Jan 18 02:38:37 2002
@@ -1,9 +1,12 @@
-#!./perl 
+#!/usr/bin/perl 
 
 BEGIN {
-    chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        unshift @INC, '../lib';
+    }
 }
+chdir 't';
 
 # these files help the test run
 use Test::More tests => 31;
@@ -41,8 +44,8 @@
 }
 
 # use module, import functions
-use_ok( 'ExtUtils::Manifest', 
-       qw( mkmanifest manicheck filecheck fullcheck maniread manicopy) );
+BEGIN { use_ok( 'ExtUtils::Manifest', 
+        qw( mkmanifest manicheck filecheck fullcheck maniread manicopy) ); }
 
 my $cwd = Cwd::getcwd();
 
@@ -78,8 +81,7 @@
 is( $res, 'bar', 'bar reported as new' );
 
 # now quiet the warning that bar was added and test again
-use vars qw($ExtUtils::Manifest::Quiet);
-$ExtUtils::Manifest::Quiet = 1;
+{ package ExtUtils::Manifest;  use vars qw($Quiet); $Quiet = 1; }
 ($res, $warn) = catch_warning( \&ExtUtils::Manifest::skipcheck );
 cmp_ok( $warn, ,'eq', '', 'disabled warnings' );
 
@@ -135,8 +137,10 @@
                                                'carped about none' );
 
 # tell ExtUtils::Manifest to use a different file
-use vars qw($ExtUtils::Manifest::MANIFEST);
-$ExtUtils::Manifest::MANIFEST = 'albatross';
+{ package ExtUtils::Manifest; 
+  use vars qw($MANIFEST); 
+  $MANIFEST = 'albatross'; 
+}
 
 ($res, $warn) = catch_warning( \&mkmanifest );
 like( $warn, qr/Added to albatross: /, 'using a new manifest file' );
diff -ru /var/local/bleadperl/lib/ExtUtils/t/Mkbootstrap.t 
./lib/ExtUtils/t/Mkbootstrap.t
--- /var/local/bleadperl/lib/ExtUtils/t/Mkbootstrap.t   Thu Jan 17 18:49:33 2002
+++ ./lib/ExtUtils/t/Mkbootstrap.t      Fri Jan 18 02:38:37 2002
@@ -1,14 +1,20 @@
-#!./perl -w
+#!/usr/bin/perl -w
 
 BEGIN {
-       chdir 't' if -d 't';
-       @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't';
+        @INC = ('../lib', 'lib/');
+    }
+    else {
+        unshift @INC, 't/lib/';
+    }
 }
+chdir 't';
 
 use vars qw( $required );
 use Test::More tests => 18;
 
-use_ok( 'ExtUtils::Mkbootstrap' );
+BEGIN { use_ok( 'ExtUtils::Mkbootstrap' ) }
 
 # Mkbootstrap makes a backup copy of "$_[0].bs" if it exists and is non-zero
 my $file_is_ready;
@@ -38,7 +44,7 @@
 Mkbootstrap('fakeboot');
 ok( !( -f 'fakeboot.bso' ), 'Mkbootstrap should not backup an empty file' );
 
-
+use TieOut;
 my $out = tie *STDOUT, 'TieOut';
 
 # with $Verbose set, it should print status messages about libraries
@@ -118,8 +124,7 @@
        close OUT;
 
        # if $DynaLoader::bscode is set, write its contents to the file
-       # localize the variable to prevent "used only once"
-       local $DynaLoader::bscode;
+    local $DynaLoader::bscode;
        $DynaLoader::bscode = 'Wall';
        $ExtUtils::Mkbootstrap::Verbose = 0;
        
@@ -147,20 +152,4 @@
 END {
        # clean things up, even on VMS
        1 while unlink(qw( mkboot.bso boot_BS dasboot.bs .bs ));
-}
-
-package TieOut;
-
-sub TIEHANDLE {
-       bless( \(my $scalar), $_[0]);
-}
-
-sub PRINT {
-       my $self = shift;
-       $$self .= join('', @_);
-}
-
-sub read {
-       my $self = shift;
-       return substr($$self, 0, length($$self), '');
 }
diff -ru /var/local/bleadperl/lib/ExtUtils/t/Packlist.t ./lib/ExtUtils/t/Packlist.t
--- /var/local/bleadperl/lib/ExtUtils/t/Packlist.t      Mon Dec 17 13:53:39 2001
+++ ./lib/ExtUtils/t/Packlist.t Fri Jan 18 02:38:37 2002
@@ -1,9 +1,12 @@
-#!./perl
+#!/usr/bin/perl -w
 
 BEGIN {
-       chdir 't' if -d 't';
-       @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
 }
+chdir 't';
 
 use Test::More tests => 34;
 
@@ -33,7 +36,8 @@
 # test FIRSTKEY and NEXTKEY
 SKIP: {
        $pl->{data}{bar} = 'baz';
-       skip('not enough keys to test FIRSTKEY', 2) unless %{ $pl->{data} } > 2;
+       skip('not enough keys to test FIRSTKEY', 2) 
+      unless keys %{ $pl->{data} } > 2;
 
        # get the first and second key
        my ($first, $second) = keys %{ $pl->{data} };
diff -ru /var/local/bleadperl/lib/ExtUtils/t/hints.t ./lib/ExtUtils/t/hints.t
--- /var/local/bleadperl/lib/ExtUtils/t/hints.t Thu Jan 17 20:39:51 2002
+++ ./lib/ExtUtils/t/hints.t    Fri Jan 18 02:38:37 2002
@@ -3,25 +3,34 @@
 BEGIN {
     if( $ENV{PERL_CORE} ) {
         chdir 't';
-        @INC = '../lib';
+        @INC = ('../lib', 'lib/');
+    }
+    else {
+        unshift @INC, 't/lib/';
     }
 }
 chdir 't';
 
-use Test::More tests => 1;
+use Test::More tests => 2;
 
 mkdir 'hints';
-my $hint = $^O;
-open(HINT, ">hints/$hint.pl") || die "Can't write dummy hints file: $!";
+my $hint_file = "hints/$^O.pl";
+open(HINT, ">$hint_file") || die "Can't write dummy hints file $hint_file: $!";
 print HINT <<'CLOO';
 $self->{CCFLAGS} = 'basset hounds got long ears';
 CLOO
 close HINT;
 
+use TieOut;
 use ExtUtils::MakeMaker;
+
+my $out = tie *STDERR, 'TieOut';
 my $mm = bless {}, 'ExtUtils::MakeMaker';
 $mm->check_hints;
 is( $mm->{CCFLAGS}, 'basset hounds got long ears' );
+is( $out->read, "Processing hints file $hint_file\n" );
+
+package Catch;
 
 
 END {
diff -ru /var/local/bleadperl/lib/ExtUtils/t/testlib.t ./lib/ExtUtils/t/testlib.t
--- /var/local/bleadperl/lib/ExtUtils/t/testlib.t       Mon Dec 17 13:53:39 2001
+++ ./lib/ExtUtils/t/testlib.t  Fri Jan 18 02:38:37 2002
@@ -1,13 +1,25 @@
-#!./perl 
+#!/usr/bin/perl -w
 
 BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
 }
+chdir 't';
 
 use Test::More tests => 3;
 
-my @blib_paths = grep { /blib/ } @INC;
+BEGIN { 
+    # non-core tests will have blib in their path.  We remove it
+    # and just use the one in lib/.
+    unless( $ENV{PERL_CORE} ) {
+        @INC = grep !/blib/, @INC;
+        unshift @INC, '../lib';
+    }
+}
+
+my @blib_paths = grep /blib/, @INC;
 is( @blib_paths, 0, 'No blib dirs yet in @INC' );
 
 use_ok( 'ExtUtils::testlib' );
diff -ru /var/local/bleadperl/lib/ExtUtils/testlib.pm ./lib/ExtUtils/testlib.pm
--- /var/local/bleadperl/lib/ExtUtils/testlib.pm        Mon Jul 31 22:31:47 2000
+++ ./lib/ExtUtils/testlib.pm   Fri Jan 18 02:35:26 2002
@@ -1,6 +1,5 @@
 package ExtUtils::testlib;
-$VERSION = substr q$Revision: 1.11 $, 10;
-# $Id: testlib.pm,v 1.11 1996/05/31 08:27:07 k Exp $
+$VERSION = 1.12_01;
 
 use lib qw(blib/arch blib/lib);
 1;
@@ -12,9 +11,11 @@
 
 =head1 SYNOPSIS
 
-C<use ExtUtils::testlib;>
+  use ExtUtils::testlib;
 
 =head1 DESCRIPTION
+
+B<THIS MODULE IS OBSOLETE!>  Use blib instead.
 
 After an extension has been built and before it is installed it may be
 desirable to test it bypassing C<make test>. By adding
--- lib/ExtUtils/inst   Mon Jul 31 22:31:47 2000
+++ /dev/null   Sat Dec  1 17:56:11 2001
@@ -1,139 +0,0 @@
-#!/usr/local/bin/perl -w
-
-use strict;
-use IO::File;
-use ExtUtils::Packlist;
-use ExtUtils::Installed;
-
-use vars qw($Inst @Modules);
-
-################################################################################
-
-sub do_module($)
-{
-my ($module) = @_;
-my $help = <<EOF;
-Available commands are:
-   f [all|prog|doc]   - List installed files of a given type
-   d [all|prog|doc]   - List the directories used by a module
-   v                  - Validate the .packlist - check for missing files
-   t <tarfile>        - Create a tar archive of the module
-   q                  - Quit the module
-EOF
-print($help);
-while (1)
-   {
-   print("$module cmd? ");
-   my $reply = <STDIN>; chomp($reply);
-   CASE:
-      {
-      $reply =~ /^f\s*/ and do
-         {
-         my $class = (split(' ', $reply))[1];
-         $class = 'all' if (! $class);
-         my @files;
-         if (eval { @files = $Inst->files($module, $class); })
-            {
-            print("$class files in $module are:\n   ",
-                  join("\n   ", @files), "\n");
-            last CASE;
-            }
-         else
-            { print($@); }
-         };
-      $reply =~ /^d\s*/ and do
-         {
-         my $class = (split(' ', $reply))[1];
-         $class = 'all' if (! $class);
-         my @dirs;
-         if (eval { @dirs = $Inst->directories($module, $class); })
-            {
-            print("$class directories in $module are:\n   ",
-                  join("\n   ", @dirs), "\n");
-            last CASE;
-            }
-         else
-            { print($@); }
-         };
-      $reply =~ /^t\s*/ and do
-         {
-         my $file = (split(' ', $reply))[1];
-         my $tmp = "/tmp/inst.$$";
-         if (my $fh = IO::File->new($tmp, "w"))
-            {
-            $fh->print(join("\n", $Inst->files($module)));
-            $fh->close();
-            system("tar cvf $file -I $tmp");
-            unlink($tmp);
-            last CASE;
-            }
-         else { print("Can't open $file: $!\n"); }
-         last CASE;
-         };
-      $reply eq 'v' and do
-         {
-         if (my @missing = $Inst->validate($module))
-            {
-            print("Files missing from $module are:\n   ",
-                  join("\n   ", @missing), "\n");
-            }
-         else
-            {
-            print("$module has no missing files\n");
-            }
-         last CASE;
-         };
-      $reply eq 'q' and do
-         {
-         return;
-         };
-      # Default
-         print($help);
-      }
-   }
-}
-
-################################################################################
-
-sub toplevel()
-{
-my $help = <<EOF;
-Available commands are:
-   l            - List all installed modules
-   m <module>   - Select a module
-   q            - Quit the program
-EOF
-print($help);
-while (1)
-   {
-   print("cmd? ");
-   my $reply = <STDIN>; chomp($reply);
-   CASE:
-      {
-      $reply eq 'l' and do
-         {
-         print("Installed modules are:\n   ", join("\n   ", @Modules), "\n");
-         last CASE;
-         };
-      $reply =~ /^m\s+/ and do
-         {
-         do_module((split(' ', $reply))[1]);
-         last CASE;
-         };
-      $reply eq 'q' and do
-         {
-         exit(0);
-         };
-      # Default
-         print($help);
-      }
-   }
-}
-
-################################################################################
-
-$Inst = ExtUtils::Installed->new();
-@Modules = $Inst->modules();
-toplevel();
-
-################################################################################
--- /dev/null   Sat Dec  1 17:56:11 2001
+++ lib/ExtUtils/instmodsh      Fri Jan 18 02:35:58 2002
@@ -0,0 +1,139 @@
+#!/usr/local/bin/perl -w
+
+use strict;
+use IO::File;
+use ExtUtils::Packlist;
+use ExtUtils::Installed;
+
+use vars qw($Inst @Modules);
+
+################################################################################
+
+sub do_module($)
+{
+my ($module) = @_;
+my $help = <<EOF;
+Available commands are:
+   f [all|prog|doc]   - List installed files of a given type
+   d [all|prog|doc]   - List the directories used by a module
+   v                  - Validate the .packlist - check for missing files
+   t <tarfile>        - Create a tar archive of the module
+   q                  - Quit the module
+EOF
+print($help);
+while (1)
+   {
+   print("$module cmd? ");
+   my $reply = <STDIN>; chomp($reply);
+   CASE:
+      {
+      $reply =~ /^f\s*/ and do
+         {
+         my $class = (split(' ', $reply))[1];
+         $class = 'all' if (! $class);
+         my @files;
+         if (eval { @files = $Inst->files($module, $class); })
+            {
+            print("$class files in $module are:\n   ",
+                  join("\n   ", @files), "\n");
+            last CASE;
+            }
+         else
+            { print($@); }
+         };
+      $reply =~ /^d\s*/ and do
+         {
+         my $class = (split(' ', $reply))[1];
+         $class = 'all' if (! $class);
+         my @dirs;
+         if (eval { @dirs = $Inst->directories($module, $class); })
+            {
+            print("$class directories in $module are:\n   ",
+                  join("\n   ", @dirs), "\n");
+            last CASE;
+            }
+         else
+            { print($@); }
+         };
+      $reply =~ /^t\s*/ and do
+         {
+         my $file = (split(' ', $reply))[1];
+         my $tmp = "/tmp/inst.$$";
+         if (my $fh = IO::File->new($tmp, "w"))
+            {
+            $fh->print(join("\n", $Inst->files($module)));
+            $fh->close();
+            system("tar cvf $file -I $tmp");
+            unlink($tmp);
+            last CASE;
+            }
+         else { print("Can't open $file: $!\n"); }
+         last CASE;
+         };
+      $reply eq 'v' and do
+         {
+         if (my @missing = $Inst->validate($module))
+            {
+            print("Files missing from $module are:\n   ",
+                  join("\n   ", @missing), "\n");
+            }
+         else
+            {
+            print("$module has no missing files\n");
+            }
+         last CASE;
+         };
+      $reply eq 'q' and do
+         {
+         return;
+         };
+      # Default
+         print($help);
+      }
+   }
+}
+
+################################################################################
+
+sub toplevel()
+{
+my $help = <<EOF;
+Available commands are:
+   l            - List all installed modules
+   m <module>   - Select a module
+   q            - Quit the program
+EOF
+print($help);
+while (1)
+   {
+   print("cmd? ");
+   my $reply = <STDIN>; chomp($reply);
+   CASE:
+      {
+      $reply eq 'l' and do
+         {
+         print("Installed modules are:\n   ", join("\n   ", @Modules), "\n");
+         last CASE;
+         };
+      $reply =~ /^m\s+/ and do
+         {
+         do_module((split(' ', $reply))[1]);
+         last CASE;
+         };
+      $reply eq 'q' and do
+         {
+         exit(0);
+         };
+      # Default
+         print($help);
+      }
+   }
+}
+
+################################################################################
+
+$Inst = ExtUtils::Installed->new();
+@Modules = $Inst->modules();
+toplevel();
+
+################################################################################
--- /dev/null   Sat Dec  1 17:56:11 2001
+++ t/lib/TieOut.pm     Fri Jan 18 02:38:51 2002
@@ -0,0 +1,17 @@
+package TieOut;
+
+sub TIEHANDLE {
+       bless( \(my $scalar), $_[0]);
+}
+
+sub PRINT {
+       my $self = shift;
+       $$self .= join('', @_);
+}
+
+sub read {
+       my $self = shift;
+       return substr($$self, 0, length($$self), '');
+}
+
+1;
--- /dev/null   Sat Dec  1 17:56:11 2001
+++ lib/ExtUtils/Changes        Fri Jan 18 01:51:56 2002
@@ -0,0 +1,22 @@
+5.48_03 Thu Jan 17 23:44:38 EST 2002
+    * moved bin/inst to bin/instmodsh
+    * Some Win32 backporting fixes.  The -x switch doesn't seem to
+      work on Win32/5.6.1.
+    * Bug on Win32.  MAKEMAKER variable not set properly.
+    * _02 broke hints files.  Now fixed.
+    - Minor prereq error formatting glitch
+    - ExtUtils::testlib no longer a thin wrapper around blib, now a 
+      thin wrapper around lib like it was.  blib is noisy on 5.6.1.
+    - Nick and chromatic found and fixed some warnings in the tests
+
+5.48_02 Wed Jan 16 19:11:26 EST 2002
+    - Fixed some Win32 warnings.  Needs more work.
+
+5.48_01 Wed Jan 16 15:10:28 EST 200
+    * Adapted from bleadperl@14303
+    * Backported to 5.6.1
+    - inst and xsubpp moved out of lib/ and into bin/
+    - ExtUtils::testlib obsoleted.  Now a thin wrapper around blib.pm
+    ***--> Non-Unix platforms not tested at all!  Please test and report
+           back.  Tests probably only need minor fixes.
+


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
Now I fight for wisdom.
        http://sluggy.com/d/010204.html

Reply via email to