about summary refs log tree commit homepage
path: root/lib/PublicInbox/Inbox.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r--lib/PublicInbox/Inbox.pm9
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;
 }