Re: Test::Harness runs tainted tests with wrong library path
authorStephen Zander <gibreel@pobox.com>
Wed, 12 May 1999 01:22:31 +0000 (18:22 -0700)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 12 May 1999 10:49:01 +0000 (10:49 +0000)
Message-ID: <87u2tik88o.fsf@pooh.fire-swamp.net>

p4raw-id: //depot/perl@3403

lib/Test/Harness.pm

index 8804cbd..662ec7f 100644 (file)
@@ -83,7 +83,8 @@ sub runtests {
        $fh->open($test) or print "can't open $test. $!\n";
        my $first = <$fh>;
        my $s = $switches;
-       $s .= q[ "-T"] if $first =~ /^#!.*\bperl.*-\w*T/;
+       $s .= join " ", q[ "-T"], map {qq["-I$_"]} @INC
+           if $first =~ /^#!.*\bperl.*-\w*T/;
        $fh->close or print "can't close $test. $!\n";
        my $cmd = ($ENV{'COMPILE_TEST'})? 
 "./perl -I../lib ../utils/perlcc $test -run 2>> ./compilelog |"