about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-11-15 09:50:38 +0000
committerEric Wong <e@80x24.org>2019-11-16 11:05:23 +0000
commit16b69a6a99661df777affec547ef53bd9007f1f2 (patch)
tree3c64439d01575707ca136a30886457cac5875cef
parent068c551dada218863a82a99e113f44c64a81b819 (diff)
downloadpublic-inbox-16b69a6a99661df777affec547ef53bd9007f1f2.tar.gz
Avoid 'Variable "%s" will not stay shared' warnings
when the contents of this script eval'ed into a sub.
-rw-r--r--script/public-inbox-learn8
1 files changed, 4 insertions, 4 deletions
diff --git a/script/public-inbox-learn b/script/public-inbox-learn
index 3073294a..93aece2e 100644
--- a/script/public-inbox-learn
+++ b/script/public-inbox-learn
@@ -39,8 +39,8 @@ my $mime = PublicInbox::MIME->new(eval {
         $data
 });
 
-sub remove_or_add ($$$) {
-        my ($ibx, $train, $addr) = @_;
+sub remove_or_add ($$$$) {
+        my ($ibx, $train, $mime, $addr) = @_;
 
         # We do not touch GIT_COMMITTER_* env here so we can track
         # who trained the message.
@@ -93,12 +93,12 @@ if ($train eq 'spam') {
         while (my ($addr, $ibx) = each %dests) {
                 next unless ref($ibx); # $ibx may be 0
                 next if $seen{"$ibx"}++;
-                remove_or_add($ibx, $train, $addr);
+                remove_or_add($ibx, $train, $mime, $addr);
         }
         my $dests = PublicInbox::MDA->inboxes_for_list_id($pi_config, $mime);
         for my $ibx (@$dests) {
                 next if !$seen{"$ibx"}++;
-                remove_or_add($ibx, $train, $ibx->{-primary_address});
+                remove_or_add($ibx, $train, $mime, $ibx->{-primary_address});
         }
 }