X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FSocket%2Fsocketpair.t;h=fea1cb53abe49167e9b23bf18bbe9499711f4ead;hb=c0bb2de79803fbbfe9a5966d43509add0c8bb4de;hp=6549eae0621853bb05ffb3abc34de2fe2465e5dc;hpb=48e3bbddf569369fe6921f305df6ab7290c91152;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Socket/socketpair.t b/ext/Socket/socketpair.t index 6549eae..fea1cb5 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'; @@ -32,7 +33,7 @@ BEGIN { $SIG{INT} = sub {exit 0}; # You have 60 seconds. Your time starts now. my $must_finish_by = time + 60; my $remaining; - while ($remaining = time - $must_finish_by) { + while (($remaining = $must_finish_by - time) > 0) { sleep $remaining; } warn "Something unexpectedly hung during testing"; @@ -40,6 +41,11 @@ BEGIN { exit 1; } } + unless ($has_perlio = find PerlIO::Layer 'perlio') { + print <