From db47ea523760f7ceef3d38c0008e082e9e7d1c02 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 2 Nov 2023 09:35:28 +0000 Subject: treewide: use ->close method rather than CORE::close It's easier-to-read and should open the door for us to get rid of `tie' for ProcessIO without performance penalties for more frequently-used perlop calls and ability to do `stat' directly on the object instead of the awkward `tied' thing. --- lib/PublicInbox/Git.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Git.pm') diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index 191e4eea..3dac32be 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -441,12 +441,12 @@ sub qx { my $fh = popen(@_); if (wantarray) { my @ret = <$fh>; - CORE::close $fh; # caller should check $? + $fh->close; # caller should check $? @ret; } else { local $/; my $ret = <$fh>; - CORE::close $fh; # caller should check $? + $fh->close; # caller should check $? $ret; } } @@ -621,7 +621,7 @@ sub manifest_entry { } } $ent->{fingerprint} = sha_all(1, $sr)->hexdigest; - CORE::close $sr or return; # empty, uninitialized git repo + $sr->close or return; # empty, uninitialized git repo $ent->{modified} = modified(undef, $mod); chomp($buf = <$own> // ''); utf8::decode($buf); -- cgit v1.2.3-24-ge0c7