On 03/11/2007, John E. Malmberg <[EMAIL PROTECTED]> wrote: > Some of the tests are trying to dynamically load modules on VMS. > > The TestInit.pm overrides @INC with a path that only works if the test > does not change the default directory on VMS. > > This patch sets @INC to an absolute path so that changes of directories > do not break dynamically loaded modules.
I've applied a less invasive version of this patch, see below. However, putting such a dependency on File::Spec is a bit disturbing, even if limited only to VMS. Wouldn't it be better to fix the tests instead ? (post-5.10 maybe) Change 32214 by [EMAIL PROTECTED] on 2007/11/03 10:12:06 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. Affected files ... ... //depot/perl/t/TestInit.pm#9 edit Differences ... ==== //depot/perl/t/TestInit.pm#9 (text) ==== @@ -18,7 +18,13 @@ $VERSION = 1.01; chdir 't' if -d 't'; [EMAIL PROTECTED] = '../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};