From 8d2513221e73649aed85ce8c3f37f7025ec1fec9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 1 Nov 2021 19:06:09 +0000 Subject: treewide: kill problematic "$h->{k} //= do {" assignments As stated in the previous change, conditional hash assignments which trigger other hash assignments seem problematic, at times. So replace: $h->{k} //= do { $h->{x} = ...; $val }; $h->{k} // do { $h->{x} = ...; $hk->{k} = $val }; "||=" is affected the same way, and some instances of "||=" are replaced with "//=" or "// do {", now. --- lib/PublicInbox/Inbox.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Inbox.pm') diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index b7b71268..1579d500 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -48,7 +48,7 @@ sub _cleanup_later ($) { sub _set_limiter ($$$) { my ($self, $pi_cfg, $pfx) = @_; my $lkey = "-${pfx}_limiter"; - $self->{$lkey} ||= do { + $self->{$lkey} //= do { # full key is: publicinbox.$NAME.httpbackendmax my $mkey = $pfx.'max'; my $val = $self->{$mkey} or return; -- cgit v1.2.3-24-ge0c7