From: Eric Wong Date: Sat, 25 Jan 2020 04:44:49 +0000 (+0000) Subject: www*stream: favor \&close instead of *close X-Git-Tag: v1.3.0~67 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=1f771820fad8b783e6afc81b38e354e6cde0b3f9 www*stream: favor \&close instead of *close Be explicit that we're making a code reference, and not a reference to a scalar, array, hash, or IO... --- diff --git a/lib/PublicInbox/WwwAtomStream.pm b/lib/PublicInbox/WwwAtomStream.pm index 9ec1383d..cb7ffe35 100644 --- a/lib/PublicInbox/WwwAtomStream.pm +++ b/lib/PublicInbox/WwwAtomStream.pm @@ -23,7 +23,7 @@ sub new { my ($class, $ctx, $cb) = @_; $ctx->{emit_header} = 1; $ctx->{feed_base_url} = $ctx->{-inbox}->base_url($ctx->{env}); - bless { cb => $cb || *close, ctx => $ctx }, $class; + bless { cb => $cb || \&close, ctx => $ctx }, $class; } sub response { diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index a724d069..ef5897b2 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -23,7 +23,7 @@ sub new { chop $base_url; # no trailing slash for clone bless { nr => 0, - cb => $cb || *close, + cb => $cb || \&close, ctx => $ctx, base_url => $base_url, }, $class;