diff options
author | Eric Wong <e@80x24.org> | 2017-01-25 21:39:06 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-01-26 03:22:54 +0000 |
commit | a465cc132b8d1ad96dbd0f51ad6da2ce75c79568 (patch) | |
tree | 50978e631b08b5f7d4429de25869ae3ea0f28640 | |
parent | c265481528208a832c5731b8da597554f2a8f693 (diff) | |
download | public-inbox-a465cc132b8d1ad96dbd0f51ad6da2ce75c79568.tar.gz |
We'll want to allow some degree of configuration for various mailing lists.
-rw-r--r-- | lib/PublicInbox/WatchMaildir.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index 0b284bdb..1823c248 100644 --- a/lib/PublicInbox/WatchMaildir.pm +++ b/lib/PublicInbox/WatchMaildir.pm @@ -238,11 +238,17 @@ sub _scrubber_for { my ($inbox) = @_; my $f = $inbox->{filter}; if ($f && $f =~ /::/) { + my @args; + # basic line splitting, only + # Perhaps we can have proper quote splitting one day... + ($f, @args) = split(/\s+/, $f) if $f =~ /\s+/; + eval "require $f"; if ($@) { warn $@; } else { - return $f->new; + # e.g: PublicInbox::Filter::Vger->new(@args) + return $f->new(@args); } } undef; |