From d3c55d072839286efb2865fe20f2324a9e595e95 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 2 Nov 2023 09:35:30 +0000 Subject: treewide: use ->close to call ProcessIO->CLOSE This will open the door for us to drop `tie' usage from ProcessIO completely in favor of OO method dispatch. While OO method dispatches (e.g. `$fh->close') are slower than normal subroutine calls, it hardly matters in this case since process teardown is a fairly rare operation and we continue to use `close($fh)' for Maildir writes. --- lib/PublicInbox/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Config.pm') diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 0a572103..01cb536d 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -192,7 +192,7 @@ sub git_config_dump { push(@cmd, '-f', $file) if !@opt_c && defined($file); my $fh = popen_rd(\@cmd, \%env, $opt); my $rv = config_fh_parse($fh, "\0", "\n"); - close $fh or die "@cmd failed: \$?=$?\n"; + $fh->close or die "@cmd failed: \$?=$?\n"; $rv->{-opt_c} = \@opt_c if @opt_c; # for ->urlmatch $rv->{-f} = $file; bless $rv, $class; -- cgit v1.2.3-24-ge0c7