]> Sergey Matveev's repositories - public-inbox.git/commitdiff
config: s/_one_val/get_1/ for public use
authorEric Wong <e@80x24.org>
Tue, 13 Jul 2021 11:06:13 +0000 (11:06 +0000)
committerEric Wong <e@80x24.org>
Sun, 18 Jul 2021 00:00:08 +0000 (00:00 +0000)
We'll be using this in lei for watch configs.

lib/PublicInbox/Config.pm

index 36f2fafb2a532ecac9ee4167084bdb0c9c2ffe7e..8e46328dbd70288291b423236c8a4c049eceb26a 100644 (file)
@@ -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)) {