}
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
$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 ($$$) {
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";
PublicInbox::Sigfd::sig_setmask($oldset);
die $@ if $@;
}
- goto(&fs_scan_step) if $self->{mdre};
+ fs_scan_step($self) if $self->{mdre};
}
sub watch_imap_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";
}
sub scan {
my ($self, $op) = @_;
push @{$self->{ops}}, $op;
- goto &fs_scan_step;
+ fs_scan_step($self);
}
sub _importer_for {