diff options
author | Eric Wong <e@80x24.org> | 2019-05-05 23:28:02 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-05-05 23:28:02 +0000 |
commit | e1ed79d1e99e2c58b3edb370e60904cf656dd823 (patch) | |
tree | 30607048c2f16a2610ad0774dcb959025357d8af /lib/PublicInbox/Inbox.pm | |
parent | 632ed77815b8ad0f683abe78f32544c7ca7b9aed (diff) | |
parent | 7a3946ef122e8218c6ce3355d7f968562212d53b (diff) | |
download | public-inbox-e1ed79d1e99e2c58b3edb370e60904cf656dd823.tar.gz |
* origin/wwwlisting: www: support listing of inboxes start depending on Perl 5.10.1+
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r-- | lib/PublicInbox/Inbox.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 0d28dd04..286555f6 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -95,6 +95,15 @@ sub new { if (defined $dir && -f "$dir/inbox.lock") { $opts->{version} = 2; } + + # allow any combination of multi-line or comma-delimited hide entries + my $hide = {}; + if (defined(my $h = $opts->{hide})) { + foreach my $v (@$h) { + $hide->{$_} = 1 foreach (split(/\s*,\s*/, $v)); + } + $opts->{-hide} = $hide; + } bless $opts, $class; } |