t/op/magic.t: Use three-arg open to avooid creating a subshell
authorBrian Fraser <fraserbn@gmail.com>
Wed, 22 Jan 2014 17:23:51 +0000 (14:23 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Wed, 22 Jan 2014 19:33:07 +0000 (16:33 -0300)
t/op/magic.t

index 75d4ed0..fbd9c9d 100644 (file)
@@ -123,7 +123,7 @@ SKIP: {
     sub FETCH { $next_test + pop }
     tie my @tn, __PACKAGE__;
 
-    open( CMDPIPE, "| $PERL");
+    open( CMDPIPE, "|-", $PERL);
 
     print CMDPIPE "\$t1 = $tn[1]; \$t2 = $tn[2];\n", <<'END';
 
@@ -146,7 +146,7 @@ END
 
     close CMDPIPE;
 
-    open( CMDPIPE, "| $PERL");
+    open( CMDPIPE, "|-", $PERL);
     print CMDPIPE "\$t3 = $tn[3];\n", <<'END';
 
     { package X;
@@ -176,7 +176,7 @@ END
     my $todo = ($^O eq 'os2' ? ' # TODO: EMX v0.9d_fix4 bug: wrong nibble? ' : '');
     print $? & 0xFF ? "ok $tn[4]$todo\n" : "not ok $tn[4]$todo\n";
 
-    open(CMDPIPE, "| $PERL");
+    open(CMDPIPE, "|-", $PERL);
     print CMDPIPE <<'END';
 
     sub PVBM () { 'foo' }