diff options
author | Adrian M. Enache <enache@rdslink.ro> | 2003-09-02 06:45:11 +0300 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-02 14:40:54 +0000 |
commit | c7e45529067e5669196da1c88cb491070e8fe1ea (patch) | |
tree | e2d19bd7f4154ce402b79c558b1704046860e3f1 /t/TEST | |
parent | 1d2654e1d58ad544e6568f317af5402a9dbaff80 (diff) | |
download | perl-c7e45529067e5669196da1c88cb491070e8fe1ea.tar.gz |
Re: ByteLoader and MSWin32
Message-ID: <20030902004511.GA1442@ratsnest.hole>
p4raw-id: //depot/perl@20993
Diffstat (limited to 't/TEST')
-rwxr-xr-x | t/TEST | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -246,9 +246,17 @@ EOT or print "can't deparse '$deparse': $!.\n"; } elsif ($type eq 'bytecompile') { - my $perl = $ENV{PERL} || './perl'; - my $redir = ($^O eq 'VMS' ? '2>&1' : ''); - my $bswitch = "-MO=Bytecode,-H,-TI,-s`pwd`/$test,"; + my ($pwd, $null); + if( $^O eq 'MSWin32') { + $pwd = `cd`; + $null = 'nul'; + } else { + $pwd = `pwd`; + $null = '/dev/null'; + } + chomp $pwd; + my $perl = $ENV{PERL} || "$pwd/perl"; + my $bswitch = "-MO=Bytecode,-H,-TI,-s$pwd/$test,"; $bswitch .= "-TF$test.plc," if $test =~ m(chdir|pod/|CGI/t/carp|lib/DB); $bswitch .= "-k," @@ -257,8 +265,8 @@ EOT if $test =~ m(op/getpid); my $bytecompile = "$perl $testswitch $switch -I../lib $bswitch". - "-o$test.plc $test 2>/dev/null &&". - "$perl $testswitch $switch -I../lib $utf $test.plc $redir|"; + "-o$test.plc $test 2>$null &&". + "$perl $testswitch $switch -I../lib $utf $test.plc |"; open(RESULTS,$bytecompile) or print "can't byte-compile '$bytecompile': $!.\n"; } |