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
This commit is contained in:
Matt Sergeant 2003-06-23 08:14:25 +00:00
parent d99eea00d6
commit 0c99d11f8b

View File

@ -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;