On 10 Jul 2005, at 16:39, Matt Sergeant wrote:
If it's just a re-defined warning, why not fix the plugin compiler to
not recompile if they've already been loaded? I think I have a patch
for that as part of high_perf, fwiw.
Index: lib/Qpsmtpd.pm
===================================================================
--- lib/Qpsmtpd.pm (revision 480)
+++ lib/Qpsmtpd.pm (working copy)
@@ -167,9 +167,15 @@
return wantarray ? @config : $config[0];
}
+our $HOOKS;
+
sub load_plugins {
my $self = shift;
-
+
+ if ($HOOKS) {
+ return $self->{hooks} = $HOOKS;
+ }
+
$self->log(LOGWARN, "Plugins already loaded") if $self->{hooks};
$self->{hooks} = {};
@@ -180,6 +186,8 @@
@plugins = $self->_load_plugins($dir, @plugins);
+ $HOOKS = $self->{hooks};
+
return @plugins;
}