From dccfcde0cd7e8c7340be0d976ee46ff563b58de0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 7 Jan 2017 01:44:45 +0000 Subject: config: always use namespaced "publicinboxlimiter" I'm not sure if we'll ever support sharing a config file with other tools, but maybe we will, and "limiter" is too generic. --- lib/PublicInbox/Config.pm | 6 +----- t/config_limiter.t | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 6e31df72..3e3d79ad 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -90,11 +90,7 @@ sub limiter { my ($self, $name) = @_; $self->{-limiters}->{$name} ||= do { require PublicInbox::Qspawn; - my $max; - # XXX "limiter..max" was a historical mistake - foreach my $pfx (qw(publicinboxlimiter limiter)) { - $max ||= $self->{"$pfx.$name.max"}; - } + my $max = $self->{"publicinboxlimiter.$name.max"}; PublicInbox::Qspawn::Limiter->new($max); }; } diff --git a/t/config_limiter.t b/t/config_limiter.t index 3c7ec557..486bfbe9 100644 --- a/t/config_limiter.t +++ b/t/config_limiter.t @@ -25,7 +25,7 @@ my $cfgpfx = "publicinbox.test"; { my $config = PublicInbox::Config->new({ - 'limiter.named.max' => 3, + 'publicinboxlimiter.named.max' => 3, "$cfgpfx.address" => 'test@example.com', "$cfgpfx.mainrepo" => '/path/to/non/existent', "$cfgpfx.httpbackendmax" => 'named', -- cgit v1.2.3-24-ge0c7