I spent a few hours synching up Test::Simple pretty much by hand.  A
simple recursive diff won't produce a useful patch since there's some
things in the core version that aren't in the CPAN version.  The most
prevalent example being the test magic:

    BEGIN {
        chdir 't' if -d 't';
        @INC = '../lib';
    }

This patch sets the PERL_CORE environment variable when running core
tests.  This way, the CPAN version of any core module can look almost
exactly like the core version.

    BEGIN {
        if( $ENV{PERL_CORE} ) {
            chdir 't' if -d 't';
            @INC = '../lib';
        }
    }

This will make my life much, much, much easier.

-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One
Let me check my notes.
        http://www.sluggy.com


--- t/TEST      2001/10/17 07:55:49     1.1
+++ t/TEST      2001/10/17 07:56:27
@@ -5,6 +5,10 @@
 
 $| = 1;
 
+# Let tests know they're running in the perl core.  Useful for modules
+# which live dual lives on CPAN.
+$ENV{PERL_CORE} = 1;
+
 # Cheesy version of Getopt::Std.  Maybe we should replace it with that.
 if ($#ARGV >= 0) {
     foreach my $idx (0..$#ARGV) {
--- t/harness   2001/10/17 07:57:18     1.1
+++ t/harness   2001/10/17 07:57:36
@@ -14,6 +14,10 @@
 $Test::Harness::switches = "";    # Too much noise otherwise
 $Test::Harness::verbose = shift if @ARGV && $ARGV[0] eq '-v';
 
+# Let tests know they're running in the perl core.  Useful for modules
+# which live dual lives on CPAN.
+$ENV{PERL_CORE} = 1;
+
 #fudge DATA for now.
 %datahandle = qw(
                lib/bigint.t            1
--- vms/test.com        2001/10/17 07:57:52     1.1
+++ vms/test.com        2001/10/17 07:58:15
@@ -134,6 +134,10 @@
 
 $| = 1;
 
+# Let tests know they're running in the perl core.  Useful for modules
+# which live dual lives on CPAN.
+$ENV{PERL_CORE} = 1;
+
 @ARGV = grep($_,@ARGV);  # remove empty elements due to "''p1'" syntax
 
 if (lc($ARGV[0]) eq '-v') {

Reply via email to