$seen = 0;
}
if ($DO_QUIT) {
- CORE::close($rfh);
+ $rfh->close;
return ();
}
}
- CORE::close($rfh);
+ $rfh->close;
return () if $DO_QUIT;
if (!$? || (($? & 127) == POSIX::SIGPIPE && $seen > $SEEN_MAX)) {
my $n = $NCHANGE - $n0;
++$score{"$ibx_id $_"} for @root_ids;
}
}
- CORE::close $rd or die "@join failed: $?=$?";
+ $rd->close or die "fatal: @join failed: \$?=$?";
my $min = $self->{-opt}->{'assoc-min'} // 10;
progress($self, scalar(keys %score).' potential pairings...');
for my $k (keys %score) {
my $ev = EPOLLIN;
my $wbuf;
if ($sock->can('accept_SSL') && !$sock->accept_SSL) {
- return CORE::close($sock) if $! != EAGAIN;
- $ev = PublicInbox::TLS::epollbit() or return CORE::close($sock);
+ return $sock->close if $! != EAGAIN;
+ $ev = PublicInbox::TLS::epollbit() or return $sock->close;
$wbuf = [ \&accept_tls_step, $self->can('do_greet')];
}
new($self, $sock, $ev | EPOLLONESHOT);
my ($self) = @_;
my $inot = delete $self->{inot} // return;
if ($inot->can('fh')) { # Linux::Inotify2 2.3+
- CORE::close($inot->fh) or warn "CLOSE ERROR: $!";
+ $inot->fh->close or warn "CLOSE ERROR: $!";
} elsif ($inot->isa('Linux::Inotify2')) {
require PublicInbox::LI2Wrap;
PublicInbox::LI2Wrap::wrapclose($inot);
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;
}
}
}
}
$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);
my $ev = EPOLLIN;
my $wbuf;
if ($sock->can('accept_SSL') && !$sock->accept_SSL) {
- return CORE::close($sock) if $! != EAGAIN;
- $ev = PublicInbox::TLS::epollbit() or return CORE::close($sock);
+ return $sock->close if $! != EAGAIN;
+ $ev = PublicInbox::TLS::epollbit() or return $sock->close;
$wbuf = [ \&PublicInbox::DS::accept_tls_step ];
}
$self->{wbuf} = $wbuf if $wbuf;
upr($lei, $w, 'create', $ref, $oid);
}
}
- CORE::close($w) or upref_warn();
+ $w->close or upref_warn();
}
sub satellite_done {
while (my ($ref, $oid) = each %$create) {
upr($fgrp->{lei}, $w, 'create', $ref, $oid);
}
- CORE::close($w) or upref_warn();
+ $w->close or upref_warn();
} else {
pack_refs($fgrp, $fgrp->{cur_dst});
run_puh($fgrp);