http://bugzilla.spamassassin.org/show_bug.cgi?id=3050
------- Additional Comments From [EMAIL PROTECTED] 2004-02-17 11:04 ------- 'Not really. The question is what can people do with the rewritten message? If we want it to be a full SA object, it needs to be parsed, there's no way around that. If all people need is the text of the rewritten part, we can just return the scalar...' we do not want it to be a full SA object; all people expect to get from a completed check() is: 1. the text of the message as headers and body 2. the get_report() lines 3. the get_names_of_tests_hit() string 4. the get_hits() string re-parsing the message is *definitely* a waste of CPU time. here's why: even if the caller expects to pass the rewritten message on for further parsing or rewriting, it will almost definitely not be for use by SpamAssassin -- it'd be some *other* filter in the message pipeline, which more than likely would be using MIME::Parser, Mail::Box or some other message class. This means that giving it a SpamAssassin message object is pretty pointless unless that message object is just being used as a lightweight wrapper around the text. given that in this case, our message object is now parsing heavily at construction time, this isn't the case anymore. So should we change the API of rewrite_mail() to return just scalars? or a new object that supports the get APIs we had previously defined in Mail::SpamAssassin::Message? (I'd prefer to avoid API breakage if we can, because it'll be a total PITA for users of these classes.) ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
