From: Eric Wong Date: Sat, 21 Mar 2020 02:03:51 +0000 (+0000) Subject: search: clobber -user_pfx on query parser initialization X-Git-Tag: v1.4.0~55 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=b76f9a8ad97b28dc9329abddadd83252614882ad search: clobber -user_pfx on query parser initialization While we don't currently reinitialize the query parser for the lifetime of a PublicInbox::Search object and have no plans to, it's incorrect to be appending to an existing array in case we reininitialize the query parser in the future. --- diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 9a394404..fabf5301 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -313,7 +313,7 @@ sub qp { # we do not actually create AltId objects, # just parse the spec to avoid the extra DB handles for now. if (my $altid = $self->{altid}) { - my $user_pfx = $self->{-user_pfx} ||= []; + my $user_pfx = $self->{-user_pfx} = []; for (@$altid) { # $_ = 'serial:gmane:/path/to/gmane.msgmap.sqlite3' /\Aserial:(\w+):/ or next;