diff options
author | Eric Wong <e@80x24.org> | 2020-09-09 06:26:12 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-09-10 19:45:18 +0000 |
commit | 352e2799ecec328f71aa33219214a0e3fc3d5f10 (patch) | |
tree | 4f1f22c286d613843d62c49d695a99f2ea05b08c /lib/PublicInbox/ExtMsg.pm | |
parent | de9648ca847cf032aab6da9cac1217bf9cca9c90 (diff) | |
download | public-inbox-352e2799ecec328f71aa33219214a0e3fc3d5f10.tar.gz |
In Perl, we can simplify callers by passing a single array all the way down the stack instead of a single array ref which needs to be expanded every call.
Diffstat (limited to 'lib/PublicInbox/ExtMsg.pm')
-rw-r--r-- | lib/PublicInbox/ExtMsg.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/ExtMsg.pm b/lib/PublicInbox/ExtMsg.pm index 5dffc65c..929737f1 100644 --- a/lib/PublicInbox/ExtMsg.pm +++ b/lib/PublicInbox/ExtMsg.pm @@ -74,8 +74,7 @@ sub search_partial ($$) { } sub ext_msg_i { - my ($other, $arg) = @_; - my ($cur, $mid, $ibxs, $found) = @$arg; + my ($other, $cur, $mid, $ibxs, $found) = @_; return if $other->{name} eq $cur->{name} || !$other->base_url; @@ -101,9 +100,9 @@ sub ext_msg { eval { require PublicInbox::Msgmap }; my $ibxs = []; my $found = []; - my $arg = [ $cur, $mid, $ibxs, $found ]; - $ctx->{www}->{pi_config}->each_inbox(\&ext_msg_i, $arg); + $ctx->{www}->{pi_config}->each_inbox(\&ext_msg_i, + $cur, $mid, $ibxs, $found); return exact($ctx, $found, $mid) if @$found; |