From c192608e62699d19973c88f292d95c227579847c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 19 Apr 2021 14:48:59 -0900 Subject: config: favor ->get_all when possible It's slightly less code. --- lib/PublicInbox/Watch.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/Watch.pm') diff --git a/lib/PublicInbox/Watch.pm b/lib/PublicInbox/Watch.pm index 05956cbb..86dae91f 100644 --- a/lib/PublicInbox/Watch.pm +++ b/lib/PublicInbox/Watch.pm @@ -53,8 +53,7 @@ sub new { # indefinitely... foreach my $pfx (qw(publicinboxwatch publicinboxlearn)) { my $k = "$pfx.watchspam"; - defined(my $dirs = $cfg->{$k}) or next; - $dirs = PublicInbox::Config::_array($dirs); + my $dirs = $cfg->get_all($k) // next; for my $dir (@$dirs) { my $uri; if (is_maildir($dir)) { -- cgit v1.2.3-24-ge0c7