From 79d9b48a0fa8c9158377fa120be25468f6aab1b8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 29 Feb 2016 00:56:20 +0000 Subject: favor procedural calls for most private functions This makes for better compile-time checking and also helps document which calls are private for HTTP and NNTP. While we're at it, use IO::Handle::* functions procedurally, too, since we know we're working with native glob handles. --- lib/PublicInbox/Spawn.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/Spawn.pm') diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm index 02c5446f..23f303fb 100644 --- a/lib/PublicInbox/Spawn.pm +++ b/lib/PublicInbox/Spawn.pm @@ -15,6 +15,7 @@ use strict; use warnings; use base qw(Exporter); use Symbol qw(gensym); +use IO::Handle; use PublicInbox::ProcessPipe; our @EXPORT_OK = qw/which spawn popen_rd/; @@ -168,7 +169,7 @@ sub popen_rd { pipe(my ($r, $w)) or die "pipe: $!\n"; $opts ||= {}; my $blocking = $opts->{Blocking}; - $r->blocking($blocking) if defined $blocking; + IO::Handle::blocking($r, $blocking) if defined $blocking; $opts->{1} = fileno($w); my $pid = spawn($cmd, $env, $opts); return ($r, $pid) if wantarray; -- cgit v1.2.3-24-ge0c7