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)
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/