On Fri, 31 May 2002, Michael Moncur wrote:

> A bit of testing reveals that TextCat.pm is trying to use this:
> $self->{main}->{rules_filename}
> 
> And it's coming out empty, so the "languages" file isn't found.

THe problem is that $self->{main}->{rules_filename} is only set when 
passed in by the caller.  If you look at init() in SpamAssassin.pm, you 
can see that $self->{rules_filename} is only tested, never assigned.

This is fixed for languages in the latest CVS by introducing a new field
of the hash for the language file name.

However, the code in EvalTests.pm that looks for triplets.txt still
assumes that $self->{main}->{rules_filename} is always set, and further
assumes that it points to a directory, which it may not be.

I'd suggest that init() set $self->{rules_filename} after it figures out
what it is, but that will still be wrong for triplets.txt in the event
that it is the name of a file rather than a directory.


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to