You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by si...@apache.org on 2007/12/31 12:46:01 UTC

svn commit: r607728 - /spamassassin/trunk/sa-compile.raw

Author: sidney
Date: Mon Dec 31 03:45:52 2007
New Revision: 607728

URL: http://svn.apache.org/viewvc?rev=607728&view=rev
Log:
bug 5748: back out revs 607229 and 606874, and do much simpler fix of removing unnecessary sort

Modified:
    spamassassin/trunk/sa-compile.raw

Modified: spamassassin/trunk/sa-compile.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/sa-compile.raw?rev=607728&r1=607727&r2=607728&view=diff
==============================================================================
--- spamassassin/trunk/sa-compile.raw (original)
+++ spamassassin/trunk/sa-compile.raw Mon Dec 31 03:45:52 2007
@@ -326,16 +326,11 @@
   my $modname;
   my $force = 1;
   my $FILE = shift;
-  my $fh;
-  my @sfh;
 
-  open($fh, $FILE) || die "open($FILE): $!";
-  @sfh = <$fh>;
-  close $fh;
-  @sfh = sort(@sfh);
+  open(my $fh, $FILE) || die "open($FILE): $!";
 # read ruleset name from the first line in the file
   my $ruleset_name;
-  $_ = shift(@sfh);
+  $_ = <$fh>;
   local ($1);
   if (/^name\s+(\S+)/) {
     $ruleset_name = untaint_var($1);
@@ -363,7 +358,7 @@
   my $numscans = 0;
   my $has_rules = '';
 
-  while (@sfh) {
+  while (!eof($fh)) {
     $numscans++;
 
     open(my $re, ">scanner${numscans}.re") || die "open(>scanner{$numscans}.re): $!";
@@ -389,7 +384,7 @@
 
     my $line = 0;
     my $rulecount = 0;
-    while ($_ = shift(@sfh)) {
+    while (<$fh>) {
       next if /^#/;
 
       local ($1,$2);