diff options
author | Eric Wong <e@80x24.org> | 2020-09-09 06:26:10 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-09-10 19:45:18 +0000 |
commit | 934fea5e3b3c4c1ef0cef29477941ebfc44ff7e0 (patch) | |
tree | 6217ad86260050f1e2a271536d1233633fc915fc /t/replace.t | |
parent | 38226be5fd4c24885658e00d4ce87ccee663063d (diff) | |
download | public-inbox-934fea5e3b3c4c1ef0cef29477941ebfc44ff7e0.tar.gz |
use "\&" where possible when referring to subroutines
"*foo" is ambiguous in that it may refer to a bareword file handle; so we'll use it where we can without triggering warnings. PublicInbox::TestCommon::run_script_exit required dropping the prototype, however. We'll also future-proof by dropping "use warnings" in Cgit.pm and use the less-ambiguous "//=" in Inbox.pm while we're in the area.
Diffstat (limited to 't/replace.t')
-rw-r--r-- | t/replace.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/replace.t b/t/replace.t index a1e2d63b..95241adf 100644 --- a/t/replace.t +++ b/t/replace.t @@ -179,10 +179,10 @@ EOF } } -my $opt = { pre => *pad_msgs }; +my $opt = { pre => \&pad_msgs }; test_replace(2, 'basic', {}); test_replace(2, 'basic', $opt); -test_replace(2, 'basic', $opt = { %$opt, post => *pad_msgs }); +test_replace(2, 'basic', $opt = { %$opt, post => \&pad_msgs }); test_replace(2, 'basic', $opt = { %$opt, rotate_bytes => 1 }); SKIP: { @@ -190,9 +190,9 @@ SKIP: { PublicInbox::Search::load_xapian() or skip 'Search::Xapian missing', 8; for my $l (qw(medium)) { test_replace(2, $l, {}); - $opt = { pre => *pad_msgs }; + $opt = { pre => \&pad_msgs }; test_replace(2, $l, $opt); - test_replace(2, $l, $opt = { %$opt, post => *pad_msgs }); + test_replace(2, $l, $opt = { %$opt, post => \&pad_msgs }); test_replace(2, $l, $opt = { %$opt, rotate_bytes => 1 }); } }; |