|
|
Author: bernhard
Date: Tue Jun 26 11:18:46 2007
New Revision: 19347
Modified:
trunk/lib/Parrot/Configure/Step.pm
trunk/lib/Parrot/Test.pm
Log:
Use two argument open for filehandle duplication.
This should get rid of file '&STDOUT' generated by Configure.pl
Modified: trunk/lib/Parrot/Configure/Step.pm
==============================================================================
--- trunk/lib/Parrot/Configure/Step.pm (original)
+++ trunk/lib/Parrot/Configure/Step.pm Tue Jun 26 11:18:46 2007
@@ -435,7 +435,8 @@
open my $OLDERR, '>&', \*STDERR or die "Can't save stderr" if $err;
open STDOUT, '>', $out or die "Can't redirect stdout" if $out;
- open STDERR, '>', $err or die "Can't redirect stderr" if $err;
+ # See 'Obscure Open Tricks' in perlopentut
+ open STDERR, ">$err" or die "Can't redirect stderr" if $err; ## no
critic InputOutput::ProhibitTwoArgOpen
system $command;
my $exit_code = $? >> 8;
Modified: trunk/lib/Parrot/Test.pm
==============================================================================
--- trunk/lib/Parrot/Test.pm (original)
+++ trunk/lib/Parrot/Test.pm Tue Jun 26 11:18:46 2007
@@ -300,8 +300,9 @@
open OLDOUT, '>&STDOUT' or die "Can't save stdout" if $out; ## no
critic InputOutput::ProhibitBarewordFileHandles
open OLDERR, '>&STDERR' or die "Can't save stderr" if $err; ## no
critic InputOutput::ProhibitBarewordFileHandles
- open STDOUT, ">", "$out" or die "Can't redirect stdout to $out" if $out;
- open STDERR, ">$err" or die "Can't redirect stderr to $err" if $err;
+ open STDOUT, '>', $out or die "Can't redirect stdout to $out" if $out;
+ # See 'Obscure Open Tricks' in perlopentut
+ open STDERR, ">$err" or die "Can't redirect stderr to $err" if $err;
## no critic InputOutput::ProhibitTwoArgOpen
# If $command isn't already an arrayref (because of a multi-command
# test), make it so now so the code below can treat everybody the
|
|