From 197be1515c48a7732791c24e53f32025c73c28cf Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 10 Sep 2014 10:37:58 -0700 Subject: [PATCH] remove empty DESTROY() --- lib/Qpsmtpd.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index 8a853c7..79a3623 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -42,8 +42,6 @@ sub _restart { } } -sub DESTROY { } - sub version { $VERSION . ($git ? "/$git" : "") } sub TRACE_LEVEL { $TraceLevel }; # leave for plugin compatibility @@ -261,14 +259,14 @@ sub _config_from_file { $visited ||= []; push @{$visited}, $configfile; - open CF, "<$configfile" + open my $CF, '<', $configfile or warn "$$ could not open configfile $configfile: $!" and return; - my @config = ; + my @config = <$CF>; chomp @config; @config = grep { length($_) and $_ !~ m/^\s*#/ and $_ =~ m/\S/ } map { s/^\s+//; s/\s+$//; $_; } # trim leading/trailing whitespace @config; - close CF; + close $CF; my $pos = 0; while ($pos < @config) {