diff options
author | Eric Wong <e@80x24.org> | 2021-11-01 19:06:09 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-11-01 19:49:39 +0000 |
commit | 8d2513221e73649aed85ce8c3f37f7025ec1fec9 (patch) | |
tree | f133a22e4174ae5326a45ca2a3dc63604f0c72d4 /lib/PublicInbox/WwwStream.pm | |
parent | b46de4da83d797281af9603f350e5b7105845eed (diff) | |
download | public-inbox-8d2513221e73649aed85ce8c3f37f7025ec1fec9.tar.gz |
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.
Diffstat (limited to 'lib/PublicInbox/WwwStream.pm')
-rw-r--r-- | lib/PublicInbox/WwwStream.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index 6d7c447f..aee78170 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -170,9 +170,9 @@ sub html_oneshot ($$;$) { 'Content-Length' => undef ]; bless $ctx, __PACKAGE__; $ctx->{gz} = PublicInbox::GzipFilter::gz_or_noop($res_hdr, $ctx->{env}); - $ctx->{base_url} //= do { + $ctx->{base_url} // do { $ctx->zmore(html_top($ctx)); - base_url($ctx); + $ctx->{base_url} = base_url($ctx); }; $ctx->zmore($$sref) if $sref; my $bdy = $ctx->zflush(_html_end($ctx)); |