Bug 1392 - need mechanism to set languages_filename when using config_text
Summary: need mechanism to set languages_filename when using config_text
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 2.43
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-17 01:25 UTC by Jared Rhine
Modified: 2003-02-02 19:43 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Rhine 2003-01-17 01:25:49 UTC
If you're trying to abstract SpamAssassin from the file-oriented 
implementation, the primary mechanism is to use a config_text parameter to the 
new Mail::SpamAssassin object.  But in the init method of SpamAssassin.pm, the 
code to set $self->{language_filename} is inside a !defined $self->
{config_text}.  So, there's no way to use TextCat functionality if you're using 
config_text.

The workaround:

   $spam->{languages_filename} = $languages_filename;

works, but is gross.

At least I think this is the case; I haven't checked with anybody or the list 
yet.
Comment 1 Justin Mason 2003-02-03 04:43:51 UTC
ok, now documented.  You can pass this to the Mail::SA ctor as well.

BTW note to SA developers: this is why using external, specially-parsed
files -- instead of normal config files with a new commmand to start each
line -- is bad.

(Although looking at "languages" I haven't a clue what format that is, so maybe
it isn't so clear-cut. ;)