> I was thinking about this the other day. It would be a simple matter
> of having a function that plugins can call:
> isa_plugin('pluginname');
> Which you can just put somewhere in your plugin file. And yes, I think
> the symbol table munging is horrid and should be done using
> inheritance, assuming you can achieve everything you need with it.
Since you designed the interface, I went ahead and implemented it.
I'm pretty sure it does everything the other implementation did,
without all of the symbol table munging and magic.
sub register {
my $self = shift;
$self->isa_plugin("rhsbl");
$self->SUPER::register(@_);
}
sub mail_handler {
my ($self) = shift;
warn "WE ARE HERE: @ISA\n";
my $r = $self->SUPER::mail_handler(@_);
warn "RESULT is $r\n";
return $r;
}
> Also, there's a whole raft of stuff in Qpsmtpd.pm that should really
> be in Plugin.pm, so I think I may clean house a bit this week.
+1
isa_plugin has to assume things about where the plugin lives. That
could definitely be abstracted out. _load_plugins has grown a bit.
-R