about summary refs log tree commit homepage
path: root/script/public-inbox-purge
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 /script/public-inbox-purge
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 'script/public-inbox-purge')
-rwxr-xr-xscript/public-inbox-purge6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/public-inbox-purge b/script/public-inbox-purge
index 0705d170..f103ccf7 100755
--- a/script/public-inbox-purge
+++ b/script/public-inbox-purge
@@ -9,11 +9,11 @@ use warnings;
 use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev);
 use PublicInbox::AdminEdit;
 PublicInbox::Admin::check_require('-index');
-require PublicInbox::Filter::Base;
-require PublicInbox::MIME;
+use PublicInbox::Filter::Base;
+use PublicInbox::MIME;
 require PublicInbox::V2Writable;
 
-{ no warnings 'once'; *REJECT = *PublicInbox::Filter::Base::REJECT }
+*REJECT = \&PublicInbox::Filter::Base::REJECT;
 
 my $usage = "$0 [--all] [INBOX_DIRS] </path/to/message";
 my $opt = { verbose => 1, all => 0, -min_inbox_version => 2 };