http://issues.apache.org/SpamAssassin/show_bug.cgi?id=3109


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #3591 is|0                           |1
           obsolete|                            |




------- Additional Comments From [EMAIL PROTECTED]  2006-07-20 12:52 -------
Created an attachment (id=3598)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3598&action=view)
new new patch against trunk

hey -- here's that next rev. changes:

- Mail::SpamAssassin::PerMsgStatus::have_shortcircuited() is now a
  call_plugin() call, as suggested.


- shortcircuit is off by default, as requested.


- something had been annoying me about the previous patch -- namely the
  creation of a new (duplicate) plugin hook with one new argument,
  "handle_hit", just to avoid having to make changes in the PerMsgStatus
  code. So I bit the bullet, and consolidated the two post-rule-fire
  plugin APIs (hit_rule and handle_hit) into one (the existing API,
  hit_rule).
  
  This required a little more work, since moving the
  call_plugins("hit_rule") calls into the got_hit() method required that
  method to be extended to support the additional data required (the
  "ruletype" string). Using perl-style name=>value pairs for the
  additional optional arguments, and keeping compatibility with the
  existing pre-3.2.0 argument set, this was doable in a
  backward-compatible way.


- Bonus: this allows Plugin/AWL.pm to be fixed to use the public
  PerMsgStatus::got_hit() API, instead of the private _handle_hit() API
  (arguably a bugfix imo).


- Bonus 2: got_eval_hit() and got_pattern_hit() became one-line wrappers
  around got_hit(); refactored out for efficiency and clarity.


- I added POD doc for got_hit(), while I was at it, since it's an API
  callable (and called) by plugins, it needs documentation.


- the 'tflags multiple' code offered an optimisation, while I was at it;
  instead of looking up tflags at scan-time to check if a rule should exit
  or look for multiple hits, it should do that only at eval-build time, in
  the hit_rule_plugin_code() code-generation call.




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

Reply via email to