From: Rafael Garcia-Suarez Date: Sat, 3 Nov 2007 10:12:06 +0000 (+0000) Subject: Based on a patch by John E. Malberg: make TestInit.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=680ed74dc0c52ab677066ffb3d985dceec0d8bfd;p=p5sagit%2Fp5-mst-13.2.git Based on a patch by John E. Malberg: make TestInit.pm use an absolute path in @INC, so that changes of directories don't break dynamically loaded modules. p4raw-id: //depot/perl@32214 --- diff --git a/t/TestInit.pm b/t/TestInit.pm index aa76fe1..058ad29 100644 --- a/t/TestInit.pm +++ b/t/TestInit.pm @@ -18,7 +18,13 @@ package TestInit; $VERSION = 1.01; chdir 't' if -d 't'; -@INC = '../lib'; +if ($^O eq 'VMS') { + require File::Spec; + @INC = File::Spec->rel2abs('[-.lib]'); +} +else { + @INC = '../lib'; +} # Don't interfere with the taintedness of %ENV, this could perturbate tests $ENV{PERL_CORE} = 1 unless ${^TAINT};