You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by km...@apache.org on 2018/02/05 14:10:24 UTC
svn commit: r1823175 [2/2] - in /spamassassin/branches/3.4: ./ build/
build/automc/ lib/Mail/ lib/Mail/SpamAssassin/
lib/Mail/SpamAssassin/BayesStore/ lib/Mail/SpamAssassin/Conf/
lib/Mail/SpamAssassin/Locker/ lib/Mail/SpamAssassin/Logger/ lib/Mail/Spam...
Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/Util/DependencyInfo.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/Util/DependencyInfo.pm?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/Util/DependencyInfo.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/Util/DependencyInfo.pm Mon Feb 5 14:10:22 2018
@@ -34,11 +34,9 @@ use warnings;
# use bytes;
use re 'taint';
-use vars qw (
- @MODULES @OPTIONAL_MODULES $EXIT_STATUS $WARNINGS @OPTIONAL_BINARIES @BINARIES
-);
+our ( $EXIT_STATUS, $WARNINGS );
-@MODULES = (
+our @MODULES = (
{
'module' => 'Digest::SHA',
'version' => 0,
@@ -94,7 +92,7 @@ use vars qw (
},
);
-my @OPTIONAL_MODULES = (
+our @OPTIONAL_MODULES = (
{
'module' => 'Digest::SHA1',
'version' => 0,
@@ -261,7 +259,7 @@ my @OPTIONAL_MODULES = (
},
);
-my @BINARIES = ();
+our @BINARIES = ();
my $lwp_note = " Sa-update will use curl, wget or fetch to download updates.
Because perl module LWP does not support IPv6, sa-update as of
@@ -272,7 +270,7 @@ my $lwp_note = " Sa-update will use cu
It's only a concern if you are warned about all 3
i.e. (curl, wget & fetch) missing";
-my @OPTIONAL_BINARIES = (
+our @OPTIONAL_BINARIES = (
{
binary => 'gpg',
version => '0',
Modified: spamassassin/branches/3.4/masses/bayes-testing/draw-bayes-histogram
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/bayes-testing/draw-bayes-histogram?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/bayes-testing/draw-bayes-histogram (original)
+++ spamassassin/branches/3.4/masses/bayes-testing/draw-bayes-histogram Mon Feb 5 14:10:22 2018
@@ -14,8 +14,7 @@
# or: draw-bayes-histogram spam.log nonspam.log (backwards compatible)
use Getopt::Long;
-use vars qw($opt_spam $opt_nonspam $opt_nocollapse $opt_nozoom
- $opt_buckets);
+our ($opt_spam, $opt_nonspam, $opt_nocollapse, $opt_nozoom, $opt_buckets);
GetOptions("spam=s", "nonspam=s", "nocollapse", "nozoom", "buckets=i");
Modified: spamassassin/branches/3.4/masses/bayes-testing/graph-accuracy-curve
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/bayes-testing/graph-accuracy-curve?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/bayes-testing/graph-accuracy-curve (original)
+++ spamassassin/branches/3.4/masses/bayes-testing/graph-accuracy-curve Mon Feb 5 14:10:22 2018
@@ -24,8 +24,8 @@
use Getopt::Long;
-use vars qw($opt_buckets);
+our $opt_buckets;
GetOptions("buckets=i");
my $buckets = $opt_buckets || 100;
Modified: spamassassin/branches/3.4/masses/bayes-testing/graph-bayes-histogram
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/bayes-testing/graph-bayes-histogram?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/bayes-testing/graph-bayes-histogram (original)
+++ spamassassin/branches/3.4/masses/bayes-testing/graph-bayes-histogram Mon Feb 5 14:10:22 2018
@@ -24,7 +24,7 @@
use Getopt::Long;
-use vars qw($opt_buckets);
+our $opt_buckets;
GetOptions("buckets=i");
Modified: spamassassin/branches/3.4/masses/bayes-testing/map-s-space/bayes-analyse-from-raw-counts
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/bayes-testing/map-s-space/bayes-analyse-from-raw-counts?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/bayes-testing/map-s-space/bayes-analyse-from-raw-counts (original)
+++ spamassassin/branches/3.4/masses/bayes-testing/map-s-space/bayes-analyse-from-raw-counts Mon Feb 5 14:10:22 2018
@@ -15,8 +15,7 @@ BEGIN { require 'constants.pl'; }
# or: draw-bayes-histogram spam.log nonspam.log (backwards compatible)
use Getopt::Long;
-use vars qw($opt_spam $opt_nonspam $opt_nocollapse $opt_nozoom
- $opt_buckets);
+our ($opt_spam, $opt_nonspam, $opt_nocollapse, $opt_nozoom, $opt_buckets);
GetOptions("spam=s", "nonspam=s", "nocollapse", "nozoom", "buckets=i");
Modified: spamassassin/branches/3.4/masses/corpora/mass-find-nonspam
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/corpora/mass-find-nonspam?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/corpora/mass-find-nonspam (original)
+++ spamassassin/branches/3.4/masses/corpora/mass-find-nonspam Mon Feb 5 14:10:22 2018
@@ -109,8 +109,7 @@ $|++;
my $format = "dir"; # for now. TODO
-use vars qw( $opt_single
-);
+our $opt_single;
use Getopt::Long;
GetOptions("single");
Modified: spamassassin/branches/3.4/masses/corpora/mk-corpus-link-farm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/corpora/mk-corpus-link-farm?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/corpora/mk-corpus-link-farm (original)
+++ spamassassin/branches/3.4/masses/corpora/mk-corpus-link-farm Mon Feb 5 14:10:22 2018
@@ -65,11 +65,7 @@ my $mbox_tmpdir = $ENV{TMPDIR} || "/tmp"
sub dbg;
use Getopt::Long;
-use vars qw(
-
- $opt_most_recent $opt_after $opt_before
-
-);
+our ($opt_most_recent, $opt_after, $opt_before);
$opt_most_recent = 0;
tz_init();
Modified: spamassassin/branches/3.4/masses/find-extremes
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/find-extremes?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/find-extremes (original)
+++ spamassassin/branches/3.4/masses/find-extremes Mon Feb 5 14:10:22 2018
@@ -21,9 +21,7 @@
use Getopt::Std;
getopts("l:L:h");
-use vars qw {
- $opt_h $opt_l $opt_L
-};
+our ($opt_h, $opt_l, $opt_L);
sub usage {
die "find-extremes [-l LC] [-L LC] [spam log] [nonspam log]
Modified: spamassassin/branches/3.4/masses/fp-fn-statistics
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/fp-fn-statistics?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/fp-fn-statistics (original)
+++ spamassassin/branches/3.4/masses/fp-fn-statistics Mon Feb 5 14:10:22 2018
@@ -60,8 +60,7 @@ the wheel?
use Getopt::Long;
use strict;
-use vars qw($opt_cffile $opt_lambda $opt_threshold $opt_scoreset
- $opt_spam $opt_ham $opt_fplog $opt_fnlog);
+our ($opt_cffile, $opt_lambda, $opt_threshold, $opt_scoreset, $opt_spam, $opt_ham, $opt_fplog, $opt_fnlog);
$opt_cffile = "../rules";
$opt_threshold = 5;
@@ -92,7 +91,7 @@ if (defined $opt_fplog) { open (FPLOG, "
my $lambda = 50;
if ($opt_lambda) { $lambda = $opt_lambda; }
-use vars qw(%scores %allrules %rules);
+our (%scores, %allrules, %rules);
readscores();
Modified: spamassassin/branches/3.4/masses/fp-fn-to-tcr
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/fp-fn-to-tcr?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/fp-fn-to-tcr (original)
+++ spamassassin/branches/3.4/masses/fp-fn-to-tcr Mon Feb 5 14:10:22 2018
@@ -18,7 +18,7 @@
# </...@LICENSE>
use Getopt::Long;
-use vars qw($opt_lambda $opt_fn $opt_fp $opt_spam $opt_ham);
+our ($opt_lambda, $opt_fn, $opt_fp, $opt_spam, $opt_ham);
GetOptions("lambda=f", "fn=f", "fp=f", "spam=f", "ham=f");
# lambda value for TCR equation, representing the cost of of an FP vs. the
Modified: spamassassin/branches/3.4/masses/freqdiff
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/freqdiff?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/freqdiff (original)
+++ spamassassin/branches/3.4/masses/freqdiff Mon Feb 5 14:10:22 2018
@@ -19,7 +19,7 @@
# limitations under the License.
# </...@LICENSE>
-use vars qw($opt_a $opt_b $opt_c $opt_d $opt_h $opt_p $opt_r $opt_l);
+our ($opt_a, $opt_b, $opt_c, $opt_d, $opt_h, $opt_p, $opt_r, $opt_l);
use Getopt::Std;
getopts("abcdhprl:");
Modified: spamassassin/branches/3.4/masses/generate-translation
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/generate-translation?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/generate-translation (original)
+++ spamassassin/branches/3.4/masses/generate-translation Mon Feb 5 14:10:22 2018
@@ -26,7 +26,7 @@ use Getopt::Std;
use Lingua::Translate;
# %rules and %scores from tmp/rules.pl
-use vars qw { $opt_c $opt_e $opt_h $opt_n $opt_r %rules %scores };
+our ($opt_c, $opt_e, $opt_h, $opt_n, $opt_r, %rules, %scores);
sub usage {
die "generate-translation language output_file
Modified: spamassassin/branches/3.4/masses/hit-frequencies
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/hit-frequencies?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/hit-frequencies (original)
+++ spamassassin/branches/3.4/masses/hit-frequencies Mon Feb 5 14:10:22 2018
@@ -24,11 +24,11 @@ use FindBin;
use Getopt::Long qw(:config bundling auto_help);
use Pod::Usage;
-use vars qw {
- $opt_c $opt_s $opt_f $opt_a $opt_p $opt_x $opt_m $opt_t $opt_M
- $opt_X $opt_L $opt_l $opt_i $opt_T $opt_o $opt_S $opt_P $opt_d
- $opt_g $sorting
-};
+our (
+ $opt_c, $opt_s, $opt_f, $opt_a, $opt_p, $opt_x, $opt_m, $opt_t, $opt_M,
+ $opt_X, $opt_L, $opt_l, $opt_i, $opt_T, $opt_o, $opt_S, $opt_P, $opt_d,
+ $opt_g, $sorting
+);
GetOptions("c|cffile=s" => \$opt_c,
"s|scoreset=i" => \$opt_s, # ,, pacify stupid emacs cperl mode
Modified: spamassassin/branches/3.4/masses/logs-to-c
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/logs-to-c?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/logs-to-c (original)
+++ spamassassin/branches/3.4/masses/logs-to-c Mon Feb 5 14:10:22 2018
@@ -51,12 +51,11 @@ L<mass-check(1)>, L<perceptron(1)>
use Getopt::Long qw(:config auto_help bundling);
use strict;
-use vars qw($opt_cffile $opt_spam $opt_ham $opt_scoreset);
-$opt_cffile = "../rules";
-$opt_spam = 'spam.log';
-$opt_ham = 'ham.log';
-$opt_scoreset = 0;
+our $opt_cffile = "../rules";
+our $opt_spam = 'spam.log';
+our $opt_ham = 'ham.log';
+our $opt_scoreset = 0;
GetOptions("cffile=s", "spam=s", "ham=s", "scoreset=i");
@@ -64,7 +63,7 @@ my $is_spam = ''; # vec aligned with @t
my @tests_hit = ();
my %mutable_tests = ();
-use vars qw(%rules %allrules %scores);
+our (%rules, %allrules, %scores);
my (%ignored_rule, %range_lo, %range_hi);
my %rule_to_index;
Modified: spamassassin/branches/3.4/masses/mass-check
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/mass-check?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/mass-check (original)
+++ spamassassin/branches/3.4/masses/mass-check Mon Feb 5 14:10:22 2018
@@ -147,20 +147,20 @@ EOF
###########################################################################
-use vars qw($opt_c $opt_p $opt_f $opt_j $opt_n $opt_o $opt_all $opt_bayes
- $opt_debug $opt_format $opt_hamlog $opt_head $opt_loghits
- $opt_mid $opt_net $opt_nosort $opt_progress $opt_showdots
- $opt_spamlog $opt_tail $opt_rules $opt_restart $opt_loguris
- $opt_logmem $opt_after $opt_before $opt_rewrite $opt_deencap
- $opt_learn $opt_reuse $opt_lint $opt_cache $opt_noisy $opt_cf
- $total_messages $statusevery $opt_cachedir $opt_scanprob
- $opt_client $opt_cs_conn_retries $opt_cs_max $opt_cs_timeout
- $opt_cs_paths_only $opt_server %postdata %real $svn_revision
- $opt_cs_ssl $opt_run_post_scan $opt_cs_verbose %client_caches
- %server_caches @cache_tmp_files %min_other_caches
- %unique_cache_completed $opt_cs_schedule_cache $opt_cs_cache
- $opt_cs_cachedir $opt_cs_max_tries $opt_pre
- $tmpfd);
+our ($opt_c, $opt_p, $opt_f, $opt_j, $opt_n, $opt_o, $opt_all, $opt_bayes,
+ $opt_debug, $opt_format, $opt_hamlog, $opt_head, $opt_loghits,
+ $opt_mid, $opt_net, $opt_nosort, $opt_progress, $opt_showdots,
+ $opt_spamlog, $opt_tail, $opt_rules, $opt_restart, $opt_loguris,
+ $opt_logmem, $opt_after, $opt_before, $opt_rewrite, $opt_deencap,
+ $opt_learn, $opt_reuse, $opt_lint, $opt_cache, $opt_noisy, $opt_cf,
+ $total_messages, $statusevery, $opt_cachedir, $opt_scanprob,
+ $opt_client, $opt_cs_conn_retries, $opt_cs_max, $opt_cs_timeout,
+ $opt_cs_paths_only, $opt_server, %postdata, %real, $svn_revision,
+ $opt_cs_ssl, $opt_run_post_scan, $opt_cs_verbose, %client_caches,
+ %server_caches, @cache_tmp_files, %min_other_caches,
+ %unique_cache_completed, $opt_cs_schedule_cache, $opt_cs_cache,
+ $opt_cs_cachedir, $opt_cs_max_tries, $opt_pre,
+ $tmpfd);
use FindBin;
Modified: spamassassin/branches/3.4/masses/mboxget
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/mboxget?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/mboxget (original)
+++ spamassassin/branches/3.4/masses/mboxget Mon Feb 5 14:10:22 2018
@@ -24,7 +24,7 @@ sub mywarn;
use Getopt::Long qw(:config bundling auto_help);
use Pod::Usage;
-use vars qw($opt_noannotate $opt_h $opt_ids);
+our ($opt_noannotate, $opt_h, $opt_ids);
GetOptions("noannotate" => \$opt_noannotate,
"ids" => \$opt_ids,
"h|headers" => \$opt_h
Modified: spamassassin/branches/3.4/masses/mk-roc-graphs
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/mk-roc-graphs?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/mk-roc-graphs (original)
+++ spamassassin/branches/3.4/masses/mk-roc-graphs Mon Feb 5 14:10:22 2018
@@ -24,7 +24,7 @@
# </...@LICENSE>
use Getopt::Long;
-use vars qw($opt_cffile $opt_spam $opt_ham $opt_count $opt_lambda);
+our ($opt_cffile, $opt_spam, $opt_ham, $opt_count, $opt_lambda);
GetOptions("cffile=s", "count", "threshold=f", "spam=s",
"ham=s", "scoreset=i", "lambda=f");
@@ -38,7 +38,7 @@ $opt_scoreset = 0 if (!defined $opt_scor
my $msgline;
-use vars qw(%rules %allrules);
+our (%rules, %allrules);
my %spam_points = ();
my %ham_points = ();
Modified: spamassassin/branches/3.4/masses/overlap
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/overlap?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/overlap (original)
+++ spamassassin/branches/3.4/masses/overlap Mon Feb 5 14:10:22 2018
@@ -20,7 +20,7 @@
use strict;
use warnings;
-use vars qw($opt_a $opt_t);
+our ($opt_a, $opt_t);
use Getopt::Long qw(:config auto_help bundling);
GetOptions("a|all" => \$opt_a,
Modified: spamassassin/branches/3.4/masses/plugins/HitFreqsRuleTiming.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/plugins/HitFreqsRuleTiming.pm?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/plugins/HitFreqsRuleTiming.pm (original)
+++ spamassassin/branches/3.4/masses/plugins/HitFreqsRuleTiming.pm Mon Feb 5 14:10:22 2018
@@ -27,8 +27,7 @@ use warnings;
use Time::HiRes qw(time);
-use vars qw(@ISA);
-@ISA = qw(Mail::SpamAssassin::Plugin);
+our @ISA = qw(Mail::SpamAssassin::Plugin);
sub new {
my $class = shift;
Modified: spamassassin/branches/3.4/masses/rewrite-cf-with-new-scores
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/rewrite-cf-with-new-scores?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/rewrite-cf-with-new-scores (original)
+++ spamassassin/branches/3.4/masses/rewrite-cf-with-new-scores Mon Feb 5 14:10:22 2018
@@ -70,7 +70,7 @@ use warnings;
use Getopt::Long qw(:config auto_help);
use Pod::Usage;
-use vars qw($opt_old $opt_new $opt_scoreset $opt_out $opt_cffile);
+our ($opt_old, $opt_new, $opt_scoreset, $opt_out, $opt_cffile);
GetOptions("old-scores=s" => \$opt_old,
"new-scores=s" => \$opt_new,
Added: spamassassin/branches/3.4/masses/rule-qa/corpus-hourly
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/rule-qa/corpus-hourly?rev=1823175&view=auto
==============================================================================
--- spamassassin/branches/3.4/masses/rule-qa/corpus-hourly (added)
+++ spamassassin/branches/3.4/masses/rule-qa/corpus-hourly Mon Feb 5 14:10:22 2018
@@ -0,0 +1,486 @@
+#!/usr/bin/perl -w
+
+# settings are located in $HOME/.corpus
+
+use strict;
+use Getopt::Long;
+
+our ( $corpusdir, $opt_override, $opt_tag );
+GetOptions(
+ "tag=s" => \$opt_tag,
+ "dir=s" => \$corpusdir,
+ "override=s" => \$opt_override,
+);
+
+$opt_override ||= '';
+$opt_tag ||= 'n'; # nightly is the default
+
+
+use File::Path;
+use File::Copy;
+use Time::ParseDate;
+use Cwd;
+use POSIX qw(nice strftime);
+
+use constant WEEK => 60*60*24;
+nice(15);
+
+my $configuration = "$ENV{HOME}/.corpus";
+my %opt;
+my %revision = ();
+my %logs_by_rev = ();
+my %is_net_revision = ();
+my %time = ();
+my @files;
+my @tmps = ();
+my $skip = '';
+my $time_start = time;
+my $output_revpath;
+
+&configure;
+&init;
+
+if ($corpusdir) {
+ print "reading logs from '$corpusdir'\n";
+}
+else {
+ $corpusdir = $opt{corpus};
+ &update_rsync;
+}
+
+&locate;
+¤t;
+&clean_up;
+
+sub configure {
+ # does rough equivalent of source
+ open(C, $configuration) || die "open failed: $configuration: $!\n";
+ my $pwd = getcwd;
+
+ # add 'override' options
+ my @lines = (<C>, split(/\|/, $opt_override));
+
+ foreach $_ (@lines) {
+ chomp;
+ s/#.*//;
+ if (/^\s*(.*?)\s*=\s*(.*?)\s*$/) {
+ my ($key, $val) = ($1, $2);
+ $val =~ s/\$PWD/$pwd/gs;
+ $opt{$key} = $val;
+ }
+ }
+ close(C);
+}
+
+sub clean_up {
+ system "rm -f $opt{tmp}/*.$$ ".join(' ', @tmps);
+}
+
+sub init {
+ $SIG{INT} = \&clean_up;
+ $SIG{TERM} = \&clean_up;
+
+ $ENV{RSYNC_PASSWORD} = $opt{password};
+ $ENV{TIME} = '%e,%U,%S';
+ $ENV{TZ} = 'UTC';
+}
+
+sub update_rsync {
+ chdir $corpusdir;
+
+ # allow non-running of rsync under some circumstances
+ if ($opt{rsync_command}) {
+ system $opt{rsync_command};
+ } else {
+ system "rsync -CPcvuzt --timeout=300 $opt{username}" . '@rsync.spamassassin.org::corpus/*.log .';
+ }
+
+ # this block is no longer required -- we do sensible things with modtime
+ # comparisons to work it out!
+ if (0 && !$opt{always_update_html}) {
+ if (-f "rsync.last") {
+ open(FIND, "find . -type f -newer rsync.last |");
+ my $files = "";
+ while(<FIND>) {
+ $files .= $_;
+ }
+ close(FIND);
+ if (! $files) {
+ print STDERR "no new corpus files\n";
+ if (rand(24) > 1) {
+ exit 0;
+ }
+ else {
+ print STDERR "updating anyway\n";
+ }
+ }
+ }
+ }
+
+ open(RSYNC, "> rsync.last");
+ close(RSYNC);
+ system "chmod +r *.log";
+}
+
+sub locate {
+ # chdir "$opt{tree}/masses" or die "cannot chdir $opt{tree}/masses";
+
+ opendir(CORPUS, $corpusdir);
+ @files = sort readdir(CORPUS);
+ closedir(CORPUS);
+
+ @files = grep {
+ /^(?:spam|ham)-(?:net-)?[-\w]+\.log$/ && -f "$corpusdir/$_" && -M _ < 10
+ } @files;
+
+ foreach my $file (@files) {
+ # my $time = 0;
+ my $tag = 0;
+ open(FILE, "$corpusdir/$file") or warn "cannot read $corpusdir/$file";
+ while (my $line = <FILE>) {
+ last if $line !~ /^#/;
+ if ($line =~ /, on (... ... .. )(..)(:..:.. ... ....)/) {
+ my ($datepre, $hh, $datepost) = ($1,$2,$3);
+
+ my $timet = Time::ParseDate::parsedate($datepre.$hh.$datepost,
+ GMT => 1, PREFER_PAST => 1);
+ $time{$file} = $timet;
+ print "$corpusdir/$file: time=$timet\n";
+
+ # if ($hh != 8) { $time++; }
+ }
+ if ($line =~ m/^# SVN revision:\s*(\S+)/) {
+ my $rev = $1;
+ $revision{$file} = $rev;
+
+ $logs_by_rev{$rev} ||= [ ];
+ push (@{$logs_by_rev{$rev}}, $file);
+
+ if ($file =~ /-net-/) {
+ $is_net_revision{$rev} = 1;
+ print "$corpusdir/$file: rev=$rev (net)\n";
+ }
+ else {
+ print "$corpusdir/$file: rev=$rev (non-net)\n";
+ }
+ }
+ }
+ close(FILE);
+ # if (!$time) {
+ # $skip .= "# skipped $_: time is between 0800 UTC and 0900 UTC\n";
+ # }
+ }
+}
+
+sub sort_all {
+ my ($a1, $a2) = ($a =~ m/(\(.*?\)|\S+)(?::(\S+))?$/);
+ my ($b1, $b2) = ($b =~ m/(\(.*?\)|\S+)(?::(\S+))?$/);
+ $a1 =~ s/^[\+\-]//;
+ $b1 =~ s/^[\+\-]//;
+
+ my $n = ($a1 cmp $b1) || (($a2 || '') cmp ($b2 || ''));
+ if ($a1 =~ /^OVERALL/) { $n -= 1000; }
+ elsif ($a1 =~ /^\(all messages\)/) { $n -= 100; }
+ elsif ($a1 =~ /^\(all messages as \%\)/) { $n -= 10; }
+ if ($b1 =~ /^OVERALL/) { $n += 1000; }
+ elsif ($b1 =~ /^\(all messages\)/) { $n += 100; }
+ elsif ($b1 =~ /^\(all messages as \%\)/) { $n += 10; }
+ return $n;
+}
+
+sub time_filter {
+ my ($after, $before) = @_;
+ if (/time=(\d+)/) {
+ return (($time_start - $1 >= WEEK * $after) &&
+ ($time_start - $1 < WEEK * $before));
+ }
+ return 0;
+}
+
+sub current {
+ my $classes = $opt{output_classes};
+ $classes ||= "DETAILS.new DETAILS.all DETAILS.age HTML.new HTML.all HTML.age NET.new NET.all NET.age";
+
+ foreach my $entry (split(' ', $classes)) {
+ $entry =~ /^(\S+)\.(\S+)$/;
+ my $class = $1;
+ my $age = $2;
+ if (!$age) { warn "no age in $entry"; next; }
+
+ foreach my $rev (sort keys %logs_by_rev) {
+ next if ($rev eq 'unknown');
+
+ if ($class =~ /NET/) {
+ next unless $is_net_revision{$rev};
+ }
+
+ gen_class ($rev, $class, $age);
+ }
+ }
+}
+
+sub gen_class {
+ my ($rev, $class, $age) = @_;
+
+ print STDERR "\ngenerating r$rev $class.$age:\n";
+
+ next if ($class eq "NET" && $age !~ /^(?:new|all|age|7day)$/);
+
+ my @ham = grep { /^ham/ } @{$logs_by_rev{$rev}};
+ my @spam = grep { /^spam/ } @{$logs_by_rev{$rev}};
+
+ print STDERR "input h: " . join(' ', @ham) . "\n";
+ print STDERR "input s: " . join(' ', @spam) . "\n";
+
+ chdir $corpusdir;
+
+ # net vs. local
+ if ($class eq "NET") {
+ @ham = grep { /-net-/ } @ham;
+ @spam = grep { /-net-/ } @spam;
+ }
+ else {
+ # if both net and local exist, use newer
+ my %spam;
+ my %ham;
+
+ for my $file (@spam) {
+ $spam{$1}++ if ($file =~ m/-(\w[-\w]+)\.log$/);
+ }
+ for my $file (@ham) {
+ $ham{$1}++ if ($file =~ m/-(\w[-\w]+)\.log$/);
+ }
+ while (my ($user, $count) = each %ham) {
+ if ($count > 1) {
+ my $nightly = "ham-$user.log";
+ my $weekly = "ham-net-$user.log";
+ if ($revision{$nightly} >= $revision{$weekly}) {
+ @ham = grep { $_ ne $weekly } @ham;
+ }
+ else {
+ @ham = grep { $_ ne $nightly } @ham;
+ }
+ }
+ }
+ while (my ($user, $count) = each %spam) {
+ if ($count > 1) {
+ my $nightly = "spam-$user.log";
+ my $weekly = "spam-net-$user.log";
+ if ($revision{$nightly} >= $revision{$weekly}) {
+ @spam = grep { $_ ne $weekly } @spam;
+ }
+ else {
+ @spam = grep { $_ ne $nightly } @spam;
+ }
+ }
+ }
+ }
+
+ # age
+ if ($age =~ /(\d+)day/) {
+ my $mtime = $1;
+ @ham = grep { -M "$_" < $mtime } @ham;
+ @spam = grep { -M "$_" < $mtime } @spam;
+ }
+ elsif ($class ne 'NET' && $age =~ /^(?:new|all|age)$/)
+ {
+ # just ignore the tagtime stuff; since we now may be
+ # dealing with multiple mass-checks per day, just use svn rev data
+ # my $tt = (-M $opt{tagtime});
+ # @ham = grep { !defined($tt) || ((-M "$_") < $tt) } @ham;
+ # @spam = grep { !defined($tt) || ((-M "$_") < $tt) } @spam;
+ }
+
+ print STDERR "selected h: " . join(' ', @ham) . "\n";
+ print STDERR "selected s: " . join(' ', @spam) . "\n";
+
+ # we cannot continue if we have no files that match the criteria...
+ # demand at least 1 ham and 1 spam file
+ if (scalar @spam <= 0 || scalar @ham <= 0) {
+ warn "not enough files found matching criteria ($rev $class $age)\n";
+ return;
+ }
+
+ my $time = $time{$ham[0]}; # use the ham file's time
+ my $dir = create_outputdir($rev, $time);
+
+ my $fname = "$dir/$class.$age";
+
+ # now, if the target file already exists, check to see if it's newer
+ # than all the sources, make-style
+ if (-f $fname) {
+ my $targetfreshness = (-M $fname);
+ my $needsrebuild = 0;
+
+ foreach my $srcfile (@spam, @ham) {
+ my $srcfreshness = (-M $srcfile);
+ if ($targetfreshness > $srcfreshness) { # src is fresher
+ print "$fname is older than $srcfile: $targetfreshness > $srcfreshness\n";
+ $needsrebuild = 1;
+ last;
+ }
+ }
+
+ if (!$needsrebuild) {
+ print "existing: $fname, fresher than sources\n";
+ return;
+ }
+ }
+
+ my $when = scalar localtime time;
+ print qq{creating: $fname
+ started $when...
+ };
+ my $bytes = 0;
+
+ if ($class eq 'LOGS') {
+ foreach my $f (@ham, @spam) {
+ $f =~ s/[^-\._A-Za-z0-9]+/_/gs; # sanitize!
+ my $zf = "$fname-$f.gz";
+
+ system("gzip -c < $f > $zf.$$");
+ if ($? >> 8 != 0) {
+ warn "gzip -c < $f > $zf.$$ failed";
+ }
+
+ rename("$zf.$$", $zf) or
+ warn "cannot rename $zf.$$ to $zf";
+ $bytes += (-s $zf);
+ }
+ }
+ else {
+ my $tmpfname = "$fname.$$";
+
+ open(OUT, "> $tmpfname") or warn "cannot write to $tmpfname";
+ print OUT "# ham results used for $rev $class $age: " . join(" ", @ham) . "\n";
+ print OUT "# spam results used for $rev $class $age: " . join(" ", @spam) . "\n";
+ for (@ham) {
+ print OUT "# $_ was at r$revision{$_}\n";
+ }
+ for (@spam) {
+ print OUT "# $_ was at r$revision{$_}\n";
+ }
+
+ push (@tmps, $tmpfname);
+
+ my $flags = "";
+ $flags = "-t net -s 1" if $class eq "NET";
+ $flags = "-M HTML_MESSAGE" if $class eq "HTML";
+ $flags = "-o" if $class eq "OVERLAP";
+ $flags = "-S" if $class eq "SCOREMAP";
+ if ($opt{rules_dir}) {
+ $flags .= " -c '$opt{rules_dir}'";
+ }
+
+ if ($age eq "all") {
+ my %spam;
+ my %ham;
+ my @output;
+
+ for my $file (@spam) {
+ $spam{$1} = $file if ($file =~ m/-(\w[-\w]+)\.log$/);
+ }
+ for my $file (@ham) {
+ $ham{$1} = $file if ($file =~ m/-(\w[-\w]+)\.log$/);
+ }
+ unlink "$opt{tmp}/ham.log.$$";
+ unlink "$opt{tmp}/spam.log.$$";
+
+ if (scalar keys %spam <= 0 || scalar keys %ham <= 0) {
+ warn "no files found for $class.$age";
+ return;
+ }
+
+ chdir "$opt{tree}/masses" or die "cannot chdir $opt{tree}/masses";
+ for my $user (sort keys %spam) {
+ next unless $ham{$user};
+ system("cat $corpusdir/$ham{$user} >> $opt{tmp}/ham.log.$$");
+ system("cat $corpusdir/$spam{$user} >> $opt{tmp}/spam.log.$$");
+ open(IN, "./hit-frequencies -TxpaP $flags $corpusdir/$spam{$user} $corpusdir/$ham{$user} |");
+ while(<IN>) {
+ chomp;
+ push @output, "$_:$user\n";
+ }
+ close(IN);
+ }
+ open(IN, "./hit-frequencies -TxpaP $flags $opt{tmp}/spam.log.$$ $opt{tmp}/ham.log.$$ |");
+ while(<IN>) {
+ push @output, $_;
+ }
+ close(IN);
+ for (sort sort_all @output) { print OUT; }
+ }
+ elsif ($age eq "age") {
+ my @output;
+
+ for my $which (("0-1", "1-2", "2-3", "3-6")) {
+ my ($after, $before) = split(/-/, $which);
+ # get and filter logs
+ chdir $corpusdir;
+ for my $type (("ham", "spam")) {
+ open(TMP, "> $opt{tmp}/$type.log.$$");
+ my @array = ($type eq "ham") ? @ham : @spam;
+ for my $file (@array) {
+ open(IN, $file) or warn "cannot read $file";
+ while (<IN>) {
+ print TMP $_ if time_filter($after, $before);
+ }
+ close(IN);
+ }
+ close (TMP);
+ }
+ # print out by age
+ chdir "$opt{tree}/masses" or die "cannot chdir $opt{tree}/masses";
+ open(IN, "./hit-frequencies -TxpaP $flags $opt{tmp}/spam.log.$$ $opt{tmp}/ham.log.$$ |");
+ while(<IN>) {
+ chomp;
+ push @output, "$_:$which\n";
+ }
+ close(IN);
+ }
+ for (sort sort_all @output) { print OUT; }
+ }
+ elsif (@ham && @spam) {
+ # get logs
+ system("cat " . join(" ", @ham) . " > $opt{tmp}/ham.log.$$");
+ system("cat " . join(" ", @spam) . " > $opt{tmp}/spam.log.$$");
+
+ chdir "$opt{tree}/masses" or die "cannot chdir $opt{tree}/masses";
+ open(IN, "./hit-frequencies -TxpaP $flags $opt{tmp}/spam.log.$$ $opt{tmp}/ham.log.$$ |");
+ while(<IN>) { print(OUT); }
+ close(IN);
+ }
+
+ $bytes = (-s OUT);
+ close(OUT);
+ rename($tmpfname, $fname) or warn "cannot rename $tmpfname to $fname";
+ }
+
+ $when = scalar localtime time;
+ print qq{created: $bytes bytes, finished at $when
+URL:
+
+ http://buildbot.spamassassin.org/ruleqa?daterev=$output_revpath
+
+};
+
+}
+
+sub create_outputdir {
+ my ($rev, $time) = @_;
+ my $revpath = strftime("%Y%m%d", gmtime($time)) . "/r$rev-$opt_tag";
+ my $dir = $opt{html} .'/'. $revpath;
+
+ # print "output dir: $dir\n";
+ if (!-d $dir) {
+ my $prevu = umask 0;
+ mkpath([$dir], 0, oct($opt{html_mode})) or warn "failed to mkdir $dir";
+ umask $prevu;
+ }
+
+ $output_revpath = $revpath; # set the global
+ $output_revpath =~ s/\//-/; # looks nicer
+
+ return $dir;
+}
+
Propchange: spamassassin/branches/3.4/masses/rule-qa/corpus-hourly
------------------------------------------------------------------------------
svn:executable = *
Modified: spamassassin/branches/3.4/masses/rule-qa/get-rulemetadata-for-revision
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/rule-qa/get-rulemetadata-for-revision?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/rule-qa/get-rulemetadata-for-revision (original)
+++ spamassassin/branches/3.4/masses/rule-qa/get-rulemetadata-for-revision Mon Feb 5 14:10:22 2018
@@ -25,10 +25,7 @@ use Cwd;
my $perl = $^X;
my $EARLIEST_REV = 428771; # before this, mkrules won't work
-use vars qw(
- $opt_outputdir
- $opt_rev
-);
+our ( $opt_outputdir, $opt_rev );
GetOptions(
"rev=s" => \$opt_rev,
"outputdir=s" => \$opt_outputdir,
Modified: spamassassin/branches/3.4/masses/rule-qa/import-logs
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/rule-qa/import-logs?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/rule-qa/import-logs (original)
+++ spamassassin/branches/3.4/masses/rule-qa/import-logs Mon Feb 5 14:10:22 2018
@@ -10,12 +10,7 @@ use Time::ParseDate;
use POSIX qw(nice strftime);
use Cwd;
-
-use vars qw(
- $opt_dir
- $opt_override
- $opt_tag
-);
+our ( $opt_dir, $opt_override, $opt_tag );
GetOptions(
"tag=s" => \$opt_tag,
"dir=s" => \$opt_dir,
Modified: spamassassin/branches/3.4/masses/rule-qa/reports-from-logs
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/rule-qa/reports-from-logs?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/rule-qa/reports-from-logs (original)
+++ spamassassin/branches/3.4/masses/rule-qa/reports-from-logs Mon Feb 5 14:10:22 2018
@@ -5,10 +5,7 @@
use strict;
use Getopt::Long;
-use vars qw(
- $opt_override
- $opt_tag
-);
+our ( $opt_override, $opt_tag );
GetOptions(
"tag=s" => \$opt_tag,
"override=s" => \$opt_override,
Modified: spamassassin/branches/3.4/masses/rule-qa/rule-hits-over-time
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/masses/rule-qa/rule-hits-over-time?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/masses/rule-qa/rule-hits-over-time (original)
+++ spamassassin/branches/3.4/masses/rule-qa/rule-hits-over-time Mon Feb 5 14:10:22 2018
@@ -45,11 +45,8 @@ usage: rule-hits-over-time [options] --r
};
}
-use vars qw(
- $opt_rule $opt_size_x $opt_size_y $opt_text $opt_cgi
- $opt_period $opt_scale_period $opt_ignore_older
- $opt_debug
-);
+our ( $opt_rule, $opt_size_x, $opt_size_y, $opt_text, $opt_cgi,
+ $opt_period, $opt_scale_period, $opt_ignore_older, $opt_debug );
GetOptions(
'rule=s',
Modified: spamassassin/branches/3.4/rulesrc/sandbox/dos/SIQ.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/rulesrc/sandbox/dos/SIQ.pm?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/rulesrc/sandbox/dos/SIQ.pm (original)
+++ spamassassin/branches/3.4/rulesrc/sandbox/dos/SIQ.pm Mon Feb 5 14:10:22 2018
@@ -123,8 +123,7 @@ use Socket;
use IO::Socket;
use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);
-use vars qw(@ISA);
-@ISA = qw(Mail::SpamAssassin::Plugin);
+our @ISA = qw(Mail::SpamAssassin::Plugin);
sub new {
Modified: spamassassin/branches/3.4/rulesrc/sandbox/felicity/sandbox-felicity.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/rulesrc/sandbox/felicity/sandbox-felicity.pm?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/rulesrc/sandbox/felicity/sandbox-felicity.pm (original)
+++ spamassassin/branches/3.4/rulesrc/sandbox/felicity/sandbox-felicity.pm Mon Feb 5 14:10:22 2018
@@ -23,8 +23,7 @@ use strict;
use warnings;
use bytes;
-use vars qw(@ISA);
-@ISA = qw(Mail::SpamAssassin::Plugin);
+our @ISA = qw(Mail::SpamAssassin::Plugin);
# constructor: register the eval rule
sub new {
Modified: spamassassin/branches/3.4/rulesrc/sandbox/hstern/sandbox-hstern.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/rulesrc/sandbox/hstern/sandbox-hstern.pm?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/rulesrc/sandbox/hstern/sandbox-hstern.pm (original)
+++ spamassassin/branches/3.4/rulesrc/sandbox/hstern/sandbox-hstern.pm Mon Feb 5 14:10:22 2018
@@ -23,10 +23,8 @@ use Mail::SpamAssassin::Plugin;
use Mail::SpamAssassin::Logger;
use Mail::SpamAssassin::Util;
-use vars qw(@ISA);
our @ISA = qw(Mail::SpamAssassin::Plugin);
-
sub new {
my $class = shift;
my $mailsa = shift;
Modified: spamassassin/branches/3.4/sa-awl.raw
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/sa-awl.raw?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/sa-awl.raw (original)
+++ spamassassin/branches/3.4/sa-awl.raw Mon Feb 5 14:10:22 2018
@@ -48,9 +48,7 @@ usage: sa-awl [--clean] [--min n] [dbfil
use Fcntl;
use Getopt::Long;
-use vars qw(
- $opt_clean $opt_min $opt_help
- );
+our ( $opt_clean, $opt_min, $opt_help );
GetOptions(
'clean' => \$opt_clean,
Modified: spamassassin/branches/3.4/sa-compile.raw
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/sa-compile.raw?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/sa-compile.raw (original)
+++ spamassassin/branches/3.4/sa-compile.raw Mon Feb 5 14:10:22 2018
@@ -66,7 +66,7 @@ use File::Path;
use Pod::Usage;
use Data::Dumper;
-use vars qw( %opt );
+our %opt;
Mail::SpamAssassin::Util::clean_path_in_taint_mode();
untaint_var( \%ENV );
@@ -603,14 +603,13 @@ EOT
package $modname;
use strict;
-use vars qw(\$VERSION \@ISA \@EXPORT_OK);
use XSLoader ();
BEGIN {
-\$VERSION = '1.0';
-\@ISA = qw(XSLoader);
-\@EXPORT_OK = qw();
+our \$VERSION = '1.0';
+our \@ISA = qw(XSLoader);
+our \@EXPORT_OK = qw();
our \$HAS_RULES = {
$has_rules
Modified: spamassassin/branches/3.4/sa-learn.raw
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/sa-learn.raw?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/sa-learn.raw (original)
+++ spamassassin/branches/3.4/sa-learn.raw Mon Feb 5 14:10:22 2018
@@ -25,12 +25,8 @@ use Getopt::Long;
use Pod::Usage;
use File::Spec;
-use vars qw(
- $spamtest %opt $isspam $forget
- $messagecount $learnedcount $messagelimit
- $progress $total_messages $init_results $start_time
- $synconly $learnprob @targets $bayes_override_path
-);
+our ( $spamtest, %opt, $isspam, $forget, $messagecount, $learnedcount, $messagelimit, $progress,
+ $total_messages, $init_results, $start_time, $synconly, $learnprob, @targets, $bayes_override_path );
my $PREFIX = '@@PREFIX@@'; # substituted at 'make' time
my $DEF_RULES_DIR = '@@DEF_RULES_DIR@@'; # substituted at 'make' time
Modified: spamassassin/branches/3.4/sa-update.raw
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/sa-update.raw?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/sa-update.raw (original)
+++ spamassassin/branches/3.4/sa-update.raw Mon Feb 5 14:10:22 2018
@@ -87,7 +87,7 @@ use HTTP::Date qw(time2str);
use Archive::Tar 1.23;
use IO::Zlib 1.04;
-use vars qw($have_lwp $io_socket_module_name $have_inet4 $have_inet6);
+our ($have_lwp, $io_socket_module_name, $have_inet4, $have_inet6);
BEGIN {
# Deal with optional modules
@@ -101,7 +101,6 @@ BEGIN {
if (eval { require IO::Socket::IP }) { # handles IPv6 and IPv4
$io_socket_module_name = 'IO::Socket::IP';
-
} elsif (eval { require IO::Socket::INET6 }) { # handles IPv6 and IPv4
$io_socket_module_name = 'IO::Socket::INET6';
@@ -110,7 +109,7 @@ BEGIN {
}
$have_inet4 = # can we create a PF_INET socket?
- defined $io_socket_module_name && eval {
+ defined $io_socket_module_name && eval {
my $sock =
$io_socket_module_name->new(LocalAddr => '0.0.0.0', Proto => 'tcp');
$sock->close or die "error closing socket: $!" if $sock;
Modified: spamassassin/branches/3.4/spamd-apache2/bin/apache-spamd.pl
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/spamd-apache2/bin/apache-spamd.pl?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/spamd-apache2/bin/apache-spamd.pl (original)
+++ spamassassin/branches/3.4/spamd-apache2/bin/apache-spamd.pl Mon Feb 5 14:10:22 2018
@@ -297,7 +297,7 @@ sub get_libexecdir_apxs {
}
# as above, cached version
-use vars '$apache_module_path';
+our $apache_module_path;
sub apache_module_path {
my $modname = shift;
$apache_module_path ||= get_libexecdir(); # path is cached
Modified: spamassassin/branches/3.4/spamd-apache2/lib/Mail/SpamAssassin/Spamd.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/spamd-apache2/lib/Mail/SpamAssassin/Spamd.pm?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/spamd-apache2/lib/Mail/SpamAssassin/Spamd.pm (original)
+++ spamassassin/branches/3.4/spamd-apache2/lib/Mail/SpamAssassin/Spamd.pm Mon Feb 5 14:10:22 2018
@@ -1,6 +1,6 @@
package Mail::SpamAssassin::Spamd;
-use vars qw(%conf_backup %msa_backup);
+our (%conf_backup, %msa_backup);
use Mail::SpamAssassin::Logger;
eval { use Time::HiRes qw(time); };
Modified: spamassassin/branches/3.4/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2.pm?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2.pm (original)
+++ spamassassin/branches/3.4/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2.pm Mon Feb 5 14:10:22 2018
@@ -22,7 +22,7 @@ use constant APACHE24 => have_min_apac
eval { use Time::HiRes qw(time); };
-use vars qw($spamtest);
+our $spamtest;
use Mail::SpamAssassin ();
use Mail::SpamAssassin::Message ();
Modified: spamassassin/branches/3.4/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/spamd/spamd.raw?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/spamd/spamd.raw (original)
+++ spamassassin/branches/3.4/spamd/spamd.raw Mon Feb 5 14:10:22 2018
@@ -38,9 +38,9 @@ BEGIN {
} # REMOVEFORINST
}
-use vars qw($have_getaddrinfo_in_core $have_getaddrinfo_legacy
- $io_socket_module_name $have_inet4 $have_inet6
- $ai_addrconfig_flag);
+our ($have_getaddrinfo_in_core, $have_getaddrinfo_legacy, $io_socket_module_name,
+ $have_inet4, $have_inet6, $ai_addrconfig_flag);
+
# don't force requirement on IO::Socket::IP or IO::Socket::INET6
BEGIN {
use Socket qw(:DEFAULT IPPROTO_TCP);
Modified: spamassassin/branches/3.4/tools/convert_awl_dbm_to_sql
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/tools/convert_awl_dbm_to_sql?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/tools/convert_awl_dbm_to_sql (original)
+++ spamassassin/branches/3.4/tools/convert_awl_dbm_to_sql Mon Feb 5 14:10:22 2018
@@ -12,8 +12,8 @@ use Getopt::Long;
use DBI;
-use DB_File ;
-use vars qw( %h $k $v ) ;
+use DB_File;
+my ( %h $k $v );
sub usage {
print "This program takes the following required arguments:\n";
Modified: spamassassin/branches/3.4/tools/mboxsplit
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/tools/mboxsplit?rev=1823175&r1=1823174&r2=1823175&view=diff
==============================================================================
--- spamassassin/branches/3.4/tools/mboxsplit (original)
+++ spamassassin/branches/3.4/tools/mboxsplit Mon Feb 5 14:10:22 2018
@@ -22,7 +22,7 @@
my $prog = $0;
$prog =~ s@.*/@@;
-use vars qw($opt_h $opt_f $opt_i $opt_n);
+our ($opt_h, $opt_f, $opt_i, $opt_n);
use Getopt::Std;
getopts("hf:in:");