From 42f390c5e4d8e6619d234a43aa5397c9977cf070 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 5 Jan 2020 23:23:34 +0000 Subject: admin: do not lazy-load Inbox or Config packages No point in lazy-loading these, since they're always loaded anyways and would not have portability problems on systems with minimal dependencies. --- lib/PublicInbox/Admin.pm | 4 ++-- lib/PublicInbox/Config.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/Admin.pm b/lib/PublicInbox/Admin.pm index 44b44b6e..1f1b133d 100644 --- a/lib/PublicInbox/Admin.pm +++ b/lib/PublicInbox/Admin.pm @@ -9,7 +9,8 @@ use warnings; use Cwd 'abs_path'; use base qw(Exporter); our @EXPORT_OK = qw(resolve_repo_dir); -require PublicInbox::Config; +use PublicInbox::Config; +use PublicInbox::Inbox; use PublicInbox::Spawn qw(popen_rd); sub resolve_repo_dir { @@ -68,7 +69,6 @@ sub unconfigured_ibx ($$) { sub resolve_inboxes ($;$$) { my ($argv, $opt, $cfg) = @_; - require PublicInbox::Inbox; $opt ||= {}; $cfg //= eval { PublicInbox::Config->new }; diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index ffc31f83..cc8c1eaf 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -10,7 +10,7 @@ package PublicInbox::Config; use strict; use warnings; -require PublicInbox::Inbox; +use PublicInbox::Inbox; use PublicInbox::Spawn qw(popen_rd); sub _array ($) { ref($_[0]) eq 'ARRAY' ? $_[0] : [ $_[0] ] } -- cgit v1.2.3-24-ge0c7