From d893d3c028a7fc442e024e5e5b8ea737945b19b3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 31 Dec 2020 17:47:50 -1200 Subject: treewide: reduce load_xapian* callsites Hopefully this will make it easier to spot dependency bugs in the future. --- lib/PublicInbox/LeiStore.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/PublicInbox/LeiStore.pm') diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index 7c62ffea..a3decf5f 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -24,10 +24,7 @@ sub new { my (undef, $dir, $opt) = @_; my $eidx = PublicInbox::ExtSearchIdx->new($dir, $opt); my $self = bless { priv_eidx => $eidx }, __PACKAGE__; - if ($opt->{creat}) { - PublicInbox::SearchIdx::load_xapian_writable(); - eidx_init($self); - } + eidx_init($self) if $opt->{creat}; $self; } -- cgit v1.2.3-24-ge0c7