From 130a7b3aa229167baeb66d349b459da7d43088ee Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Thu, 6 Dec 2001 17:45:44 -0500 Subject: which_perl for safer $^Xing Message-ID: <20011207034544.GN22648@blackrider> (plus op/ref tweak) p4raw-id: //depot/perl@13506 --- t/io/open.t | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 't/io') diff --git a/t/io/open.t b/t/io/open.t index 92e71ea47a..cb8aea371f 100755 --- a/t/io/open.t +++ b/t/io/open.t @@ -12,6 +12,8 @@ $Is_VMS = $^O eq 'VMS'; plan tests => 95; +my $Perl = which_perl(); + { unlink("afile") if -f "afile"; @@ -76,7 +78,7 @@ SKIP: { skip "open -| busted and noisy on VMS", 3 if $Is_VMS; ok( open(my $f, '-|', <; @@ -86,7 +88,7 @@ EOC { ok( open(my $f, '|-', <; @@ -169,7 +171,7 @@ SKIP: { skip "open -| busted and noisy on VMS", 3 if $Is_VMS; ok( open(local $f, '-|', <; @@ -179,7 +181,7 @@ EOC { ok( open(local $f, '|-', <; @@ -203,13 +205,13 @@ like( $@, qr/Bad filehandle:\s+afile/, ' right error' ); { local *F; for (1..2) { - ok( open(F, qq{$^X -le "print 'ok'"|}), 'open to pipe' ); + ok( open(F, qq{$Perl -le "print 'ok'"|}), 'open to pipe' ); is(scalar , "ok\n", ' readline'); ok( close F, ' close' ); } for (1..2) { - ok( open(F, "-|", qq{$^X -le "print 'ok'"}), 'open -|'); + ok( open(F, "-|", qq{$Perl -le "print 'ok'"}), 'open -|'); is( scalar , "ok\n", ' readline'); ok( close F, ' close' ); } -- cgit v1.2.1