X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=lib%2FPublicInbox%2FWatch.pm;h=0f41dff289d6e72a318fc85e7c2dafbcf023f3bd;hp=17786377ba8127fe7744acc14216f873ec71edf7;hb=352e2799ecec328f71aa33219214a0e3fc3d5f10;hpb=de9648ca847cf032aab6da9cac1217bf9cca9c90 diff --git a/lib/PublicInbox/Watch.pm b/lib/PublicInbox/Watch.pm index 17786377..0f41dff2 100644 --- a/lib/PublicInbox/Watch.pm +++ b/lib/PublicInbox/Watch.pm @@ -133,8 +133,7 @@ sub _done_for_now { } sub remove_eml_i { # each_inbox callback - my ($ibx, $arg) = @_; - my ($self, $eml, $loc) = @$arg; + my ($ibx, $self, $eml, $loc) = @_; eval { # try to avoid taking a lock or unnecessary spawning @@ -176,7 +175,7 @@ sub _remove_spam { $path =~ /:2,[A-R]*S[T-Za-z]*\z/ or return; my $eml = eml_from_path($path) or return; local $SIG{__WARN__} = warn_ignore_cb(); - $self->{config}->each_inbox(\&remove_eml_i, [ $self, $eml, $path ]); + $self->{config}->each_inbox(\&remove_eml_i, $self, $eml, $path); } sub import_eml ($$$) { @@ -419,8 +418,8 @@ sub imap_import_msg ($$$$$) { if ($flags =~ /\\Seen\b/) { local $SIG{__WARN__} = warn_ignore_cb(); my $eml = PublicInbox::Eml->new($raw); - my $arg = [ $self, $eml, "$url UID:$uid" ]; - $self->{config}->each_inbox(\&remove_eml_i, $arg); + $self->{config}->each_inbox(\&remove_eml_i, + $self, $eml, "$url UID:$uid"); } } else { die "BUG: destination unknown $inboxes"; @@ -967,8 +966,8 @@ sub nntp_fetch_all ($$$) { } } elsif ($inboxes eq 'watchspam') { my $eml = PublicInbox::Eml->new(\$raw); - my $arg = [ $self, $eml, "$url ARTICLE $art" ]; - $self->{config}->each_inbox(\&remove_eml_i, $arg); + $self->{config}->each_inbox(\&remove_eml_i, + $self, $eml, "$url ARTICLE $art"); } else { die "BUG: destination unknown $inboxes"; }