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 2004/03/13 06:08:11 UTC

svn commit: rev 9396 - in incubator/spamassassin/trunk: . lib/Mail/SpamAssassin lib/Mail/SpamAssassin/BayesStore sql t

Author: felicity
Date: Fri Mar 12 21:08:10 2004
New Revision: 9396

Added:
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/DBM.pm
      - copied, changed from rev 9395, incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStoreDBM.pm
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/SQL.pm
      - copied, changed from rev 9395, incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStoreSQL.pm
Removed:
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStoreDBM.pm
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStoreSQL.pm
Modified:
   incubator/spamassassin/trunk/MANIFEST
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Bayes.pm
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm
   incubator/spamassassin/trunk/sql/README.bayes
   incubator/spamassassin/trunk/t/bayessql.t
Log:
Making BayesStoreSQL and BayesStoreDBM to BayesStore/SQL and BayesStore/DBM ...  It's a bit cleaner this way. :)

Modified: incubator/spamassassin/trunk/MANIFEST
==============================================================================
--- incubator/spamassassin/trunk/MANIFEST	(original)
+++ incubator/spamassassin/trunk/MANIFEST	Fri Mar 12 21:08:10 2004
@@ -34,8 +34,8 @@
 lib/Mail/SpamAssassin/AutoWhitelist.pm
 lib/Mail/SpamAssassin/Bayes.pm
 lib/Mail/SpamAssassin/BayesStore.pm
-lib/Mail/SpamAssassin/BayesStoreDBM.pm
-lib/Mail/SpamAssassin/BayesStoreSQL.pm
+lib/Mail/SpamAssassin/BayesStore/DBM.pm
+lib/Mail/SpamAssassin/BayesStore/SQL.pm
 lib/Mail/SpamAssassin/Conf.pm
 lib/Mail/SpamAssassin/ConfSourceLDAP.pm
 lib/Mail/SpamAssassin/ConfSourceSQL.pm

Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Bayes.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Bayes.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Bayes.pm	Fri Mar 12 21:08:10 2004
@@ -248,8 +248,8 @@
     $self->{store} = $store;
   }
   else {
-    require Mail::SpamAssassin::BayesStoreDBM;
-    $self->{store} = Mail::SpamAssassin::BayesStoreDBM->new($self);
+    require Mail::SpamAssassin::BayesStore::DBM;
+    $self->{store} = Mail::SpamAssassin::BayesStore::DBM->new($self);
   }
 
   $self;

Copied: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/DBM.pm (from rev 9395, incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStoreDBM.pm)
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStoreDBM.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/DBM.pm	Fri Mar 12 21:08:10 2004
@@ -14,7 +14,7 @@
 # limitations under the License.
 # </...@LICENSE>
 
-package Mail::SpamAssassin::BayesStoreDBM;
+package Mail::SpamAssassin::BayesStore::DBM;
 
 use strict;
 use bytes;

Copied: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/SQL.pm (from rev 9395, incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStoreSQL.pm)
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStoreSQL.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/SQL.pm	Fri Mar 12 21:08:10 2004
@@ -16,7 +16,7 @@
 
 =head1 NAME
 
-Mail::SpamAssassin::BayesStoreSQL - SQL Bayesian Storage Module Implementation
+Mail::SpamAssassin::BayesStore::SQL - SQL Bayesian Storage Module Implementation
 
 =head1 SYNOPSIS
 
@@ -26,7 +26,7 @@
 
 =cut
 
-package Mail::SpamAssassin::BayesStoreSQL;
+package Mail::SpamAssassin::BayesStore::SQL;
 
 use strict;
 use bytes;
@@ -43,10 +43,10 @@
 
 =head2 new
 
-public class (Mail::SpamAssassin::BayesStoreSQL) new (Mail::Spamassassin::Bayes $bayes)
+public class (Mail::SpamAssassin::BayesStore::SQL) new (Mail::Spamassassin::Bayes $bayes)
 
 Description:
-This methods creates a new instance of the Mail::SpamAssassin::BayesStoreSQL
+This methods creates a new instance of the Mail::SpamAssassin::BayesStore::SQL
 object.  It expects to be passed an instance of the Mail::SpamAssassin:Bayes
 object which is passed into the Mail::SpamAssassin::BayesStore parent object.
 

Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm	Fri Mar 12 21:08:10 2004
@@ -1936,9 +1936,9 @@
 
 =item bayes_sql_override_username
 
-Used by BayesStoreSQL storage implementation.
+Used by BayesStore::SQL storage implementation.
 
-If this options is set the BayesStoreSQL module will override the set username with
+If this options is set the BayesStore::SQL module will override the set username with
 the value given.  This could be useful for implementing global or group bayes databases.
 
 =cut
@@ -2621,7 +2621,7 @@
 
 =item bayes_sql_dsn DBI::databasetype:databasename:hostname:port
 
-Used for BayesStoreSQL storage implementation.
+Used for BayesStore::SQL storage implementation.
 
 This option give the connect string used to connect to the SQL based Bayes storage.
 
@@ -2633,7 +2633,7 @@
 
 =item bayes_sql_username
 
-Used by BayesStoreSQL storage implementation.
+Used by BayesStore::SQL storage implementation.
 
 This option gives the username used by the above DSN.
 
@@ -2645,7 +2645,7 @@
 
 =item bayes_sql_password
 
-Used by BayesStoreSQL storage implementation.
+Used by BayesStore::SQL storage implementation.
 
 This option gives the password used by the above DSN.
 

Modified: incubator/spamassassin/trunk/sql/README.bayes
==============================================================================
--- incubator/spamassassin/trunk/sql/README.bayes	(original)
+++ incubator/spamassassin/trunk/sql/README.bayes	Fri Mar 12 21:08:10 2004
@@ -14,11 +14,11 @@
 
 The directives required to turn on the SQL based bayesian storage are:
 
-bayes_store_module		   Mail::SpamAssassin::BayesStoreSQL
+bayes_store_module		   Mail::SpamAssassin::BayesStore::SQL
 
 This directive is used by the Bayes module to determine which storage
 module should be used.  If not set it will default to:
-Mail::SpamAssassin::BayesStoreDBM
+Mail::SpamAssassin::BayesStore::DBM
 
 bayes_sql_dsn			   DBI:driver:database:hostname[:port]
 bayes_sql_username		   dbusername
@@ -55,7 +55,7 @@
 RDBMS, you must have the DBD::mysql module installed.  Check CPAN for
 the latest versions of DBI and your database driver/module. 
 
-The BayesStoreSQL module was tested with:
+The BayesStore::SQL module was tested with:
 
 DBI-1.38
 DBD-mysql-2.9002
@@ -73,7 +73,7 @@
 the minimum tables and columns necessary to work with the code as
 written.  You are free to add other columns as needed for your local
 implementation.  Presently there is no way to override the table and
-column names used by the BayesStoreSQL code, this feature may be added
+column names used by the BayesStore::SQL code, this feature may be added
 in the future.
 
 Example setup of bayes tables for MySQL:
@@ -119,7 +119,7 @@
 against PostgreSQL and SQLite.  It does require a database that allows
 you to refer to a column on the right hand side of an expression (ie
 update foo set bar = bar + 1).  Any database driver that allows for
-that usage should work with the BayesStoreSQL code.  NOTE: You may
+that usage should work with the BayesStore::SQL code.  NOTE: You may
 find that some implementations do not provide a significant advantage
 over using the default DBM implementation.  If you find a driver that
 should work and has issues, please report them to the SADev list.

Modified: incubator/spamassassin/trunk/t/bayessql.t
==============================================================================
--- incubator/spamassassin/trunk/t/bayessql.t	(original)
+++ incubator/spamassassin/trunk/t/bayessql.t	Fri Mar 12 21:08:10 2004
@@ -53,7 +53,7 @@
 sa_t_init("bayes");
 
 tstlocalrules ("
-bayes_store_module Mail::SpamAssassin::BayesStoreSQL
+bayes_store_module Mail::SpamAssassin::BayesStore::SQL
 $dbconfig
 bayes_sql_override_username $testuser
 ");
@@ -170,7 +170,7 @@
 
 # make sure we learn to a journal
 tstlocalrules ("
-bayes_store_module Mail::SpamAssassin::BayesStoreSQL
+bayes_store_module Mail::SpamAssassin::BayesStore::SQL
 $dbconfig
 bayes_min_spam_num 10
 bayes_min_ham_num 10