--- Module-Build-0.27_08/t/lib/MBTest.pm.orig 2006-03-03 19:27:57.000000000 -0800
+++ Module-Build-0.27_08/t/lib/MBTest.pm 2006-03-05 11:28:21.187500000 -0800
@@ -5,16 +5,17 @@
use File::Spec;
BEGIN {
+ # Make sure none of our tests load the users ~/.modulebuildrc file
+ $ENV{MODULEBUILDRC} = 'NONE';
+
# In case the test wants to use Test::More or our other bundled
# modules, make sure they can be loaded. They'll still do "use
# Test::More" in the test script.
my $t_lib = File::Spec->catdir('t', 'bundled');
- push @INC, $t_lib; # Let user's installed version override
- # Make sure none of our tests load the users ~/.modulebuildrc file
- $ENV{MODULEBUILDRC} = 'NONE';
-
- if ($ENV{PERL_CORE}) {
+ if (!$ENV{PERL_CORE}) {
+ push @INC, $t_lib; # Let user's installed version override
+ } else {
# We change directories, so expand @INC to absolute paths
# Also add .
@INC = (map(File::Spec->rel2abs($_), @INC), ".");
@@ -22,6 +23,8 @@
# we are in 't', go up a level so we don't create t/t/_tmp
chdir '..' or die "Couldn't chdir to ..";
+ push @INC, File::Spec->catdir(qw/lib Module Build/, $t_lib);
+
# make sure children get @INC pointing to uninstalled files
require Cwd;
$ENV{PERL5LIB} = File::Spec->catdir(Cwd::cwd(), 'lib');
|