From: Jarkko Hietaniemi Date: Wed, 3 Apr 2002 19:15:33 +0000 (+0000) Subject: non-perlio robustness. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=475207295892c8d6f0f8cb39eddae4e2f1733f4f;p=p5sagit%2Fp5-mst-13.2.git non-perlio robustness. p4raw-id: //depot/perl@15714 --- diff --git a/ext/Socket/socketpair.t b/ext/Socket/socketpair.t index 1d6fc8b..79dfb63 100644 --- a/ext/Socket/socketpair.t +++ b/ext/Socket/socketpair.t @@ -2,6 +2,7 @@ my $child; my $can_fork; +my $has_perlio; BEGIN { chdir 't' if -d 't'; @@ -40,6 +41,11 @@ BEGIN { exit 1; } } + unless ($has_perlio = find PerlIO::Layer 'perlio') { + print <$progfile" or die "Can't open '$progfile': $!"; - binmode(P, ":bytes"); + binmode(P, ":bytes") if $has_perlio; print P $show, $prog, '; print $b' or die "Print to 'progfile' failed: $!"; close P or die "Can't close '$progfile': $!";