From a7d4f457ec2b4531b3aaeb6cef1383bbda5b431a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 31 Dec 2019 10:30:12 +0000 Subject: filter/base: export REJECT as a constant And update callers to use it, as it makes the code a bit cleaner. Probably irrelvant, but it should be faster, too, as "perl -I lib -w -MO=Deparse $FILE" shows REJECT() calls are constant-folded. --- lib/PublicInbox/Filter/Base.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/PublicInbox/Filter') diff --git a/lib/PublicInbox/Filter/Base.pm b/lib/PublicInbox/Filter/Base.pm index 7a0c720f..81adab2a 100644 --- a/lib/PublicInbox/Filter/Base.pm +++ b/lib/PublicInbox/Filter/Base.pm @@ -6,6 +6,8 @@ package PublicInbox::Filter::Base; use strict; use warnings; use PublicInbox::MsgIter; +use parent qw(Exporter); +our @EXPORT_OK = qw(REJECT); # we may export IGNORE if/when needed sub No ($) { "*** We only accept plain-text mail, No $_[0] ***" } -- cgit v1.2.3-24-ge0c7