about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-01-25 04:44:49 +0000
committerEric Wong <e@yhbt.net>2020-01-27 02:59:09 +0000
commit1f771820fad8b783e6afc81b38e354e6cde0b3f9 (patch)
tree8b82caca29d02133f6aa3d2d1b201c6242e258bc /lib/PublicInbox
parentf5f7508636e5ecc4dcc2ecb18c6efc8c67e778f8 (diff)
downloadpublic-inbox-1f771820fad8b783e6afc81b38e354e6cde0b3f9.tar.gz
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...
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/WwwAtomStream.pm2
-rw-r--r--lib/PublicInbox/WwwStream.pm2
2 files changed, 2 insertions, 2 deletions
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;