From: Eric Wong Date: Sat, 13 Sep 2025 12:21:50 +0000 (+0000) Subject: searchidx: use warn for excessively long terms X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4efbd982d30811a3e35d72dd70e40c27ccdd8595;p=thirdparty%2Fpublic-inbox.git searchidx: use warn for excessively long terms Filename and linenumber context information from Carp::carp is unlikely to be useful here on (likely) worthless data from bad MUAs. carp adds needless noise for users tracking down actual code bugs with PERL5OPT=-MCarp=verbose, which changes Carp::carp into Carp::cluck. --- diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 0cd7a046b..48173a232 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -200,7 +200,7 @@ sub index_text1 { # called by various ->index_extra sub add_bool_term ($$) { my ($doc, $pfx_term) = @_; if (length($pfx_term) > MAX_TERM_SIZE) { - carp "W: skipping term: `$pfx_term'.length > ", + warn "W: skipping term: `$pfx_term'.length > ", MAX_TERM_SIZE, "\n"; } else { $doc->add_boolean_term($pfx_term);