]> Sergey Matveev's repositories - public-inbox.git/commitdiff
search: export mdocid subroutine
authorEric Wong <e@yhbt.net>
Thu, 20 Aug 2020 20:24:45 +0000 (20:24 +0000)
committerEric Wong <e@yhbt.net>
Thu, 20 Aug 2020 21:11:14 +0000 (21:11 +0000)
No need to have awkward globrefs for this.

lib/PublicInbox/IMAP.pm
lib/PublicInbox/Search.pm

index 3d66f9306ffc37c8e2664f2fb8f3acfc8c4933e4..562c59d474a2c3c658ccbd4991a30c5ac4c8a524 100644 (file)
@@ -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)) {
index 593040a8a285340a69465d8bd27fba357387f28a..f98513d320cf743301a65f28c9c4a5a6e7ce338e 100644 (file)
@@ -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)