Update of /cvsroot/module-build/Module-Build/t/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22894/t/lib
Modified Files:
MBTest.pm
Log Message:
Ensure we find bundled modules when installed with perl core. [Yitzchak Scott-Thoennes]
Index: MBTest.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/lib/MBTest.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- MBTest.pm 9 Jan 2006 01:18:15 -0000 1.3
+++ MBTest.pm 6 Mar 2006 23:33:24 -0000 1.4
@@ -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');
|