X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FConfig.pm;h=f6275cdd24663d2f5b3f8235d7e188a04863b923;hb=ba4c50c20b95679580beba1ef290a4281d5285b7;hp=6e31df7267fe0c64be3c8dc95db8e8f66819a9df;hpb=f084e94a4774b95eb45f55fc9f0dfda678522e54;p=public-inbox.git diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 6e31df72..f6275cdd 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -90,21 +90,11 @@ 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); }; } -sub get { - my ($self, $inbox, $key) = @_; - - $self->{"publicinbox.$inbox.$key"}; -} - sub config_dir { $ENV{PI_DIR} || "$ENV{HOME}/.public-inbox" } sub default_file { @@ -121,7 +111,7 @@ sub git_config_dump { my $fh = popen_rd(\@cmd) or die "popen_rd failed for $file: $!\n"; my %rv; local $/ = "\n"; - foreach my $line (<$fh>) { + while (defined(my $line = <$fh>)) { chomp $line; my ($k, $v) = split(/=/, $line, 2); my $cur = $rv{$k}; @@ -146,7 +136,7 @@ sub _fill { foreach my $k (qw(mainrepo address filter url newsgroup infourl watch watchheader httpbackendmax - feedmax)) { + feedmax nntpserver)) { my $v = $self->{"$pfx.$k"}; $rv->{$k} = $v if defined $v; }