From 352e2799ecec328f71aa33219214a0e3fc3d5f10 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 9 Sep 2020 06:26:12 +0000 Subject: config: flatten each_inbox and iterate_start args 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. --- lib/PublicInbox/ExtMsg.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/ExtMsg.pm') 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; -- cgit v1.2.3-24-ge0c7