From: Eric Wong Date: Thu, 20 Aug 2020 20:24:45 +0000 (+0000) Subject: search: export mdocid subroutine X-Git-Tag: v1.6.0~123 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=75352ebba2a00db912b4225b27a04ac865df1656 search: export mdocid subroutine No need to have awkward globrefs for this. --- 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)