You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2004/05/11 09:19:46 UTC
svn commit: rev 10591 - in incubator/spamassassin/trunk: . lib/Mail
Author: jm
Date: Tue May 11 00:19:44 2004
New Revision: 10591
Modified:
incubator/spamassassin/trunk/lib/Mail/SpamAssassin.pm
incubator/spamassassin/trunk/spamassassin.raw
Log:
added a diagnostic method to --lint, which lists the versions of various installed modules for debugging
Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin.pm (original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin.pm Tue May 11 00:19:44 2004
@@ -1140,6 +1140,35 @@
###########################################################################
+=item $f->debug_diagnostics ()
+
+Output some diagnostic information, useful for debugging SpamAssassin
+problems.
+
+=cut
+
+sub debug_diagnostics {
+ my ($self) = @_;
+
+ foreach my $module (sort qw(
+ Net::DNS Razor2::Client::Agent MIME::Base64
+ IO::Socket::UNIX DB_File Digest::SHA1
+ MIME::Base64 DBI URI Net::LDAP Storable
+ ))
+ {
+ my $modver;
+ if (eval ' require '.$module.'; $modver = $'.$module.'::VERSION; 1;')
+ {
+ $modver ||= '(undef)';
+ dbg ("diag: module installed: $module, version $modver");
+ } else {
+ dbg ("diag: module not installed: $module ('require' failed)");
+ }
+ }
+}
+
+###########################################################################
+
=item $failed = $f->lint_rules ()
Syntax-check the current set of rules. Returns the number of
Modified: incubator/spamassassin/trunk/spamassassin.raw
==============================================================================
--- incubator/spamassassin/trunk/spamassassin.raw (original)
+++ incubator/spamassassin/trunk/spamassassin.raw Tue May 11 00:19:44 2004
@@ -170,6 +170,7 @@
}
if ( $opt{'lint'} ) {
+ $spamtest->debug_diagnostics();
exit $spamtest->lint_rules();
}