From e37f14b9a63e39b344955e7bc79ffe4262e93811 Mon Sep 17 00:00:00 2001 From: Robert Date: Sun, 9 May 2010 22:45:59 -0700 Subject: microoptimizations - replace regex with lc eq --- plugins/check_bogus_bounce | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/check_bogus_bounce b/plugins/check_bogus_bounce index 045889c..968f1c6 100644 --- a/plugins/check_bogus_bounce +++ b/plugins/check_bogus_bounce @@ -88,7 +88,7 @@ sub hook_data_post { # Find the sender, and return unless it wasn't a bounce. # my $sender = $transaction->sender->address || undef; - return DECLINED unless ($sender =~ /^<>$/); + return DECLINED unless ($sender eq "<>"); # # Get the recipients. @@ -102,15 +102,15 @@ sub hook_data_post { # 1. It is a bounce, via the null-envelope. # 2. It is a bogus bounce, because there are more than one recipients. # - if ($self->{_action} =~ /^log$/i) { + if (lc $self->{_action} eq "log") { $self->log(LOGWARN, $self->plugin_name() . " bogus bounce for :" . join(",", @to)); } - elsif ($self->{_action} =~ /^deny$/i) { + elsif (lc $self->{_action} eq "deny") { return (DENY, $self->plugin_name() . " determined this to be a bogus bounce"); } - elsif ($self->{_action} =~ /^denysoft$/i) { + elsif (lc $self->{_action} eq "denysoft") { return (DENYSOFT, $self->plugin_name() . " determined this to be a bogus bounce"); } -- 1.7.2.2