about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-12-23 23:06:03 +0000
committerEric Wong <e@80x24.org>2019-12-24 03:46:57 +0000
commitf1259e56d75b8f06a40fb466bee51a399cc317c5 (patch)
treebac026f90e435acda5f622c657c324baa8bf6714 /lib/PublicInbox
parentc608ab025c4351c820c97e0ed907647274c662a2 (diff)
downloadpublic-inbox-f1259e56d75b8f06a40fb466bee51a399cc317c5.tar.gz
We can use "use" to get the namespace into the "BEGIN" phase of
the interpreter.  While we're at it, use \&coderef syntax
explicitly instead of globbing everything.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/Spawn.pm3
-rw-r--r--lib/PublicInbox/WwwListing.pm3
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm
index 6493ad38..c64812dd 100644
--- a/lib/PublicInbox/Spawn.pm
+++ b/lib/PublicInbox/Spawn.pm
@@ -172,8 +172,7 @@ if (defined $vfork_spawn) {
 
 unless (defined $vfork_spawn) {
         require PublicInbox::SpawnPP;
-        no warnings 'once';
-        *pi_fork_exec = *PublicInbox::SpawnPP::pi_fork_exec
+        *pi_fork_exec = \&PublicInbox::SpawnPP::pi_fork_exec
 }
 
 sub which ($) {
diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm
index 03534f03..bcb968af 100644
--- a/lib/PublicInbox/WwwListing.pm
+++ b/lib/PublicInbox/WwwListing.pm
@@ -9,11 +9,12 @@ use warnings;
 use PublicInbox::Hval qw(ascii_html);
 use PublicInbox::Linkify;
 use PublicInbox::View;
+use PublicInbox::Inbox;
 use bytes ();
 use HTTP::Date qw(time2str);
 require Digest::SHA;
 require File::Spec;
-{ no warnings 'once'; *try_cat = *PublicInbox::Inbox::try_cat };
+*try_cat = \&PublicInbox::Inbox::try_cat;
 
 sub list_all ($$$) {
         my ($self, $env, $hide_key) = @_;