This fixes the redefined warnings.

All plugins don't have register() any more, but they all have plugin_name().

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@505 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
John Peacock 2005-07-14 11:05:11 +00:00
parent bfd72e8ade
commit 3707751b42
2 changed files with 3 additions and 3 deletions

View File

@ -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")

View File

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