From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 155A11FB05 for ; Thu, 20 Aug 2020 20:25:00 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 11/23] search: export mdocid subroutine Date: Thu, 20 Aug 2020 20:24:45 +0000 Message-Id: <20200820202457.21042-12-e@yhbt.net> In-Reply-To: <20200820202457.21042-1-e@yhbt.net> References: <20200820202457.21042-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: No need to have awkward globrefs for this. --- lib/PublicInbox/IMAP.pm | 3 +-- lib/PublicInbox/Search.pm | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/IMAP.pm b/lib/PublicInbox/IMAP.pm index 3d66f930..562c59d4 100644 --- a/lib/PublicInbox/IMAP.pm +++ b/lib/PublicInbox/IMAP.pm @@ -40,9 +40,8 @@ use PublicInbox::Syscall qw(EPOLLIN EPOLLONESHOT); use PublicInbox::GitAsyncCat; use Text::ParseWords qw(parse_line); use Errno qw(EAGAIN); -use PublicInbox::Search; +use PublicInbox::Search qw(mdocid); use PublicInbox::IMAPsearchqp; -*mdocid = \&PublicInbox::Search::mdocid; my $Address; for my $mod (qw(Email::Address::XS Mail::Address)) { diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 593040a8..f98513d3 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -5,6 +5,8 @@ # Read-only search interface for use by the web and NNTP interfaces package PublicInbox::Search; use strict; +use parent qw(Exporter); +our @EXPORT_OK = qw(mdocid); # values for searching, changing the numeric value breaks # compatibility with old indices (so don't change them it)