From 0c99d11f8b111dbb94f9aa8f24ccecb7aedc6daa Mon Sep 17 00:00:00 2001 From: Matt Sergeant Date: Mon, 23 Jun 2003 08:14:25 +0000 Subject: [PATCH] Don't reload plugins if already loaded (stops warnings under pperl) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@157 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index 3f2b47d..4dfdafc 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -104,6 +104,9 @@ sub load_plugins { my $plugin_name = $plugin; + # don't reload plugins if they are already loaded + next if defined &{"Qpsmtpd::Plugin::${plugin_name}::register"}; + # Escape everything into valid perl identifiers $plugin_name =~ s/([^A-Za-z0-9_\/])/sprintf("_%2x",unpack("C",$1))/eg;