Author: REHSACK
Date: Thu Dec 13 06:29:51 2012
New Revision: 15512

Modified:
   dbi/branches/sqlengine/Changes
   dbi/branches/sqlengine/lib/DBD/DBM.pm
   dbi/branches/sqlengine/t/50dbm_simple.t

Log:
- warn when $dbh->{dbm_ext} and $dbh->{dbm_lockfile} are used
- bump version of DBD::DBM because of that


Modified: dbi/branches/sqlengine/Changes
==============================================================================
--- dbi/branches/sqlengine/Changes      (original)
+++ dbi/branches/sqlengine/Changes      Thu Dec 13 06:29:51 2012
@@ -36,6 +36,10 @@
 
   Removed internal _not_impl method (Martin J. Evans).
 
+  NOTE: The "old-style" DBD::DBM attributes 'dbm_ext' and 'dbm_lockfile'
+    had been deprecated for several years and their use will now generate
+    a warning.
+
 =head2 Changes in DBI 1.622 (svn r15327) 6th June 2012
 
   Fixed lack of =encoding in non-ASCII pod docs. RT#77588

Modified: dbi/branches/sqlengine/lib/DBD/DBM.pm
==============================================================================
--- dbi/branches/sqlengine/lib/DBD/DBM.pm       (original)
+++ dbi/branches/sqlengine/lib/DBD/DBM.pm       Thu Dec 13 06:29:51 2012
@@ -24,7 +24,7 @@
 #################
 use base qw( DBD::File );
 use vars qw($VERSION $ATTRIBUTION $drh $methods_already_installed);
-$VERSION     = '0.07';
+$VERSION     = '0.08';
 $ATTRIBUTION = 'DBD::DBM by Jens Rehsack';
 
 # no need to have driver() unless you need private methods
@@ -76,6 +76,8 @@
 $DBD::DBM::db::imp_data_size = 0;
 @DBD::DBM::db::ISA           = qw(DBD::File::db);
 
+use Carp qw/carp/;
+
 sub validate_STORE_attr
 {
     my ( $dbh, $attrib, $value ) = @_;
@@ -83,7 +85,7 @@
     if ( $attrib eq "dbm_ext" or $attrib eq "dbm_lockfile" )
     {
         ( my $newattrib = $attrib ) =~ s/^dbm_/f_/g;
-        # carp "Attribute '$attrib' is depreciated, use '$newattrib' instead" 
if( $^W );
+        carp "Attribute '$attrib' is depreciated, use '$newattrib' instead" 
if( $^W );
         $attrib = $newattrib;
     }
 
@@ -97,7 +99,7 @@
     if ( $attrib eq "dbm_ext" or $attrib eq "dbm_lockfile" )
     {
         ( my $newattrib = $attrib ) =~ s/^dbm_/f_/g;
-        # carp "Attribute '$attrib' is depreciated, use '$newattrib' instead" 
if( $^W );
+        carp "Attribute '$attrib' is depreciated, use '$newattrib' instead" 
if( $^W );
         $attrib = $newattrib;
     }
 

Modified: dbi/branches/sqlengine/t/50dbm_simple.t
==============================================================================
--- dbi/branches/sqlengine/t/50dbm_simple.t     (original)
+++ dbi/branches/sqlengine/t/50dbm_simple.t     Thu Dec 13 06:29:51 2012
@@ -175,7 +175,7 @@
     # (This test script doesn't test that locking actually works anyway.)
 
     # use f_lockfile in next release - use it here as test case only
-    my $dsn 
="dbi:DBM(RaiseError=0,PrintError=1):dbm_type=$dtype;dbm_mldbm=$mldbm;dbm_lockfile=.lck";
+    my $dsn 
="dbi:DBM(RaiseError=0,PrintError=1):dbm_type=$dtype;dbm_mldbm=$mldbm;f_lockfile=.lck";
 
     if ($using_dbd_gofer) {
         $dsn .= ";f_dir=$dir";

Reply via email to