Avoid 'Variable "%s" will not stay shared' warnings
when the contents of this script eval'ed into a sub.
my $precheck = grep(/\A--no-precheck\z/, @ARGV) ? 0 : 1;
my ($ems, $emm);
my $precheck = grep(/\A--no-precheck\z/, @ARGV) ? 0 : 1;
my ($ems, $emm);
my ($code) = shift;
$emm = $ems = undef; # trigger DESTROY
exit $code;
my ($code) = shift;
$emm = $ems = undef; # trigger DESTROY
exit $code;
use Email::Simple;
use PublicInbox::MIME;
use Email::Simple;
use PublicInbox::MIME;
if (!scalar(@$dests) && !defined($recipient)) {
die "ORIGINAL_RECIPIENT not defined in ENV\n";
}
if (!scalar(@$dests) && !defined($recipient)) {
die "ORIGINAL_RECIPIENT not defined in ENV\n";
}
- scalar(@$dests) or do_exit(67); # EX_NOUSER 5.1.1 user unknown
+ scalar(@$dests) or $do_exit->(67); # EX_NOUSER 5.1.1 user unknown
-do_exit(67) if $err && scalar(@$dests) == 0;
+$do_exit->(67) if $err && scalar(@$dests) == 0;
$simple = undef;
my $spam_ok;
$simple = undef;
my $spam_ok;
my $fh = $emm->fh;
read($fh, $str, -s $fh);
}
my $fh = $emm->fh;
read($fh, $str, -s $fh);
}
-do_exit(0) unless $spam_ok;
+$do_exit->(0) unless $spam_ok;
# -mda defaults to the strict base filter which we won't use anywhere else
sub mda_filter_adjust ($) {
# -mda defaults to the strict base filter which we won't use anywhere else
sub mda_filter_adjust ($) {
die join("\n", @rejects, '');
}
die join("\n", @rejects, '');
}