It'll always be used as a callback, so there's no point in
giving it a name to be called non-anonymously. Making
assigments to it is slightly faster since there's no need
to repeatedly do a lookup by name.
our $LIM = 200;
my %rmap_inc;
-sub noop {}
+my $noop = sub {};
sub mbox_results {
my ($ctx) = @_;
if ($err) {
$code = 400;
$ctx->{-html_tip} = '<pre>'.err_txt($ctx, $err).'</pre><hr>';
- $cb = *noop;
+ $cb = $noop;
} elsif ($total == 0) {
if (defined($ctx->{-uxs_retried})) {
# undo retry damage:
}
$code = 404;
$ctx->{-html_tip} = "<pre>\n[No results found]</pre><hr>";
- $cb = *noop;
+ $cb = $noop;
} else {
return adump($_[0], $mset, $q, $ctx) if $x eq 'A';
$$res .= "$pfx - by $f @ $date UTC [$pct%]\n\n";
}
$$res .= search_nav_bot($mset, $q);
- *noop;
+ $noop;
}
# shorten "/full/path/to/Foo/Bar.pm" to "Foo/Bar.pm" so error