From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 5D2081F9E5 for ; Mon, 19 Jul 2021 08:59:35 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/2] config: s/_one_val/get_1/ for public use Date: Mon, 19 Jul 2021 08:59:34 +0000 Message-Id: <20210719085935.1986-2-e@80x24.org> In-Reply-To: <20210719085935.1986-1-e@80x24.org> References: <20210719085935.1986-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We'll be using this in lei for watch configs. --- lib/PublicInbox/Config.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 36f2fafb..8e46328d 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -384,7 +384,7 @@ sub rel2abs_collapsed { Cwd::abs_path($p); } -sub _one_val { +sub get_1 { my ($self, $pfx, $k) = @_; my $v = $self->{"$pfx.$k"} // return; return $v if !ref($v); @@ -430,7 +430,7 @@ sub _fill_ibx { } for my $k (qw(filter inboxdir newsgroup replyto httpbackendmax feedmax indexlevel indexsequentialshard)) { - my $v = _one_val($self, $pfx, $k) // next; + my $v = get_1($self, $pfx, $k) // next; $ibx->{$k} = $v; } @@ -522,7 +522,7 @@ sub _fill_ei ($$) { } my $es = PublicInbox::ExtSearch->new($d); for my $k (qw(indexlevel indexsequentialshard)) { - my $v = _one_val($self, $pfx, $k) // next; + my $v = get_1($self, $pfx, $k) // next; $es->{$k} = $v; } for my $k (qw(altid coderepo hide url infourl)) {