You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2005/02/22 21:20:21 UTC

svn commit: r154893 - spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm

Author: felicity
Date: Tue Feb 22 12:20:19 2005
New Revision: 154893

URL: http://svn.apache.org/viewcvs?view=rev&rev=154893
Log:
more obfu work, use 1 RE instead of 2 -- improves hitrate and potentially faster

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm?view=diff&r1=154892&r2=154893
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm Tue Feb 22 12:20:19 2005
@@ -3367,14 +3367,14 @@
       }
 
       # cache both the word and the new RE
-      push(@{$obfu_cache{$word}}, qr/\b$word\b/i, qr/\b$new\b/i);
+      $obfu_cache{$word} = qr/\b(?!$word)$new\b/i;
     }
 
     # this word will be cached now, use that version
-    ($word,$new) = @{$obfu_cache{$word}};
+    $new = $obfu_cache{$word};
 
     foreach (@{$body}) {
-      if (/$new/ && !/$word/) {
+      if (/$new/) {
 	#warn ">> $new\n$_\n\n";
         return 1;
       }