https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6228

Anthony Foiani <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #10 from Anthony Foiani <[email protected]> 2009-12-16 
22:41:41 UTC ---
(In reply to comment #9)
> Just a guess: it may have become broken with pluginization
> of Bayes.pm (Mail/SpamAssassin/Bayes.pm ->
>    Mail/SpamAssassin/Bayes.pm + Mail/SpamAssassin/Plugin/Bayes.pm )

I believe you're correct. [*]

In Plugin/Bayes.pm (around line 1501), "learner_new" creates the backing store
object and assigns it into $self->{store}.  But in that routine, $self is
blessed as:

  Mail::SpamAssassin::Plugin::Bayes=HASH(0x2ed88e0)

When we get back into sa-learn and try to use ->{store} directly, we
$spamtest->{bayes_scanner} which is blessed as:

  Mail::SpamAssassin::Bayes=HASH(0x171f100)

So there's the disconnect.  I'll look at it for a bit longer, but I suspect
that either the plugin needs to assign that store into the legacy object, or
sa-learn needs to be revised to deal with the plugin and not the legacy
interface.

As a hack, I suspect that learner_new could just stick the store in both
places.

[*] I am not at all familiar with the SA codebase, but I've a fair bit of
experience with perl.  Nirik (Kevin Fenzi) asked me to take a look at this.

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to