[svn:qpsmtpd] rev 505 - in branches/0.31/lib: . Qpsmtpd
[email protected] 14 Jul 2005 11:05:12 -0000
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
Author: jpeacock
Date: Thu Jul 14 04:05:11 2005
New Revision: 505
Modified:
branches/0.31/lib/Qpsmtpd.pm
branches/0.31/lib/Qpsmtpd/Plugin.pm
Log:
This fixes the redefined warnings.
All plugins don't have register() any more, but they all have plugin_name().
Modified: branches/0.31/lib/Qpsmtpd.pm
==============================================================================
--- branches/0.31/lib/Qpsmtpd.pm (original)
+++ branches/0.31/lib/Qpsmtpd.pm Thu Jul 14 04:05:11 2005
@@ -230,7 +230,7 @@ sub _load_plugins {
my $package = "Qpsmtpd::Plugin::$plugin_name";
# don't reload plugins if they are already loaded
- unless ( defined &{"${package}::register"} ) {
+ unless ( defined &{"${package}::plugin_name"} ) {
Qpsmtpd::Plugin->compile($plugin_name,
$package, "$dir/$plugin", $self->{_test_mode});
$self->log(LOGDEBUG, "Loading $plugin_line")
Modified: branches/0.31/lib/Qpsmtpd/Plugin.pm
==============================================================================
--- branches/0.31/lib/Qpsmtpd/Plugin.pm (original)
+++ branches/0.31/lib/Qpsmtpd/Plugin.pm Thu Jul 14 04:05:11 2005
@@ -94,8 +94,8 @@ sub isa_plugin {
$cleanParent =~ s/\W/_/g;
my $newPackage = $currentPackage."::_isa_$cleanParent";
-
- return if defined &{"${newPackage}::register"};
+ # don't reload plugins if they are already loaded
+ return if defined &{"${newPackage}::plugin_name"};
$self->compile($self->plugin_name . "_isa_$cleanParent",
$newPackage,