http://bugzilla.spamassassin.org/show_bug.cgi?id=3759





------- Additional Comments From [EMAIL PROTECTED]  2004-09-08 18:18 -------
Created an attachment (id=2329)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2329&action=view)
fix

ok, here's a fix.  The bug only happens if the new plugins are loaded from the
"site config path" (/etc/mail/spamassassin by default), because by that stage,
SpamAssassin has compiled the list of callbacks for parse_config().

the fix is to invalidate that cached list if a new plugin is loaded.   For
efficiency, and due to a perl shortcoming, only a subset of the callback
methods are invalidated -- the ones that can run at config time -- namely
parse_config() only.

(the shortcoming: perl doesn't have introspection of what methods an
object supports as far as I can see.  worked around, anyway)

I've also folded in the fix for a bug someone reported on the dev list I think
-- using $INHIBIT_CALLBACKS is a misfeature, because it forces plugins to only
support numeric return types on methods, instead of allowing string return
types.   this is bad.   So this drops support for $INHIBIT_CALLBACKS, and
parse_config() implementors that were using that now have to use the
alternative $self->inhibit_further_callbacks() API.  (in reality it
makes virtually no difference to the amount of code required; using
the alternative API is a matter of 10 characters.)




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to