diff options
author | Eric Wong <e@80x24.org> | 2020-12-26 01:44:36 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-12-26 19:27:15 +0000 |
commit | 0b018bebe7d8ee807ab07b570cf33669da4875b0 (patch) | |
tree | 9a0eb73298a8226b722d81db1d88a2fdb7d7adcf /lib/PublicInbox/ExtSearchIdx.pm | |
parent | b5e960f50289434025f5904c8c1311e4c8a02b82 (diff) | |
download | public-inbox-0b018bebe7d8ee807ab07b570cf33669da4875b0.tar.gz |
As with CORE::die and $SIG{__DIE__}, it turns out CORE::warn is safe to use inside $SIG{__WARN__} handlers without triggering infinite recursion. So fall back to reusing CORE::warn instead of creating a new sub.
Diffstat (limited to 'lib/PublicInbox/ExtSearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/ExtSearchIdx.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index e7fdae48..64ebf6db 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -841,7 +841,7 @@ sub eidx_reindex { sub eidx_sync { # main entry point my ($self, $opt) = @_; - my $warn_cb = $SIG{__WARN__} || sub { print STDERR @_ }; + my $warn_cb = $SIG{__WARN__} || \&CORE::warn; local $self->{current_info} = ''; local $SIG{__WARN__} = sub { $warn_cb->($self->{current_info}, ': ', @_); |