From 1f771820fad8b783e6afc81b38e354e6cde0b3f9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 25 Jan 2020 04:44:49 +0000 Subject: 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... --- lib/PublicInbox/WwwAtomStream.pm | 2 +- lib/PublicInbox/WwwStream.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox') 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; -- cgit v1.2.3-24-ge0c7