From a91d27a8913d432a227706c8bc80ed991d93c431 Mon Sep 17 00:00:00 2001 From: "Ronald J. Kimball" Date: Sun, 25 Jun 2000 19:43:12 -0400 Subject: [PATCH] Paranoia tweak on #6249. Subject: Re: [PATCH 5.6.0 IPC/Open3.pm] Allow the use of numeric fd's Message-ID: <20000625234312.B74147@linguist.dartmouth.edu> p4raw-id: //depot/cfgperl@6253 --- lib/IPC/Open3.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/IPC/Open3.pm b/lib/IPC/Open3.pm index facf39c..5078a9a 100644 --- a/lib/IPC/Open3.pm +++ b/lib/IPC/Open3.pm @@ -140,16 +140,16 @@ sub xclose { close $_[0] or croak "$Me: close($_[0]) failed: $!"; } +sub fh_is_fd { + return $_[0] =~ /\A=?(\d+)\z/; +} + sub xfileno { my ($fh) = @_; - return $1 if $fh =~ /^=?(\d+)$/; # deal with $fh just being an fd + return $1 if =~ /\A=?(\d+)\z/; # deal with $fh just being an fd return fileno $fh; } -sub fh_is_fd { - return $_[0] =~ /^=?\d+$/; -} - my $do_spawn = $^O eq 'os2' || $^O eq 'MSWin32'; sub _open3 { -- 2.7.4