Fixed a couple problems, wrote tests for a couple more
[dbsrgits/DBM-Deep.git] / lib / DBM / Deep.pm
index 1769c90..58e77ee 100644 (file)
@@ -8,8 +8,6 @@ use warnings;
 our $VERSION = q(1.0009);
 
 use Fcntl qw( :flock );
-
-use Digest::MD5 ();
 use Scalar::Util ();
 
 use DBM::Deep::Engine;
@@ -19,6 +17,8 @@ use overload
     '""' => sub { overload::StrVal( $_[0] ) },
     fallback => 1;
 
+use constant DEBUG => 0;
+
 ##
 # Setup constants for users to pass to new()
 ##
@@ -457,6 +457,7 @@ sub STORE {
     ##
     my $self = shift->_get_self;
     my ($key, $value) = @_;
+    warn "STORE($self, $key, $value)\n" if DEBUG;
 
     unless ( $self->_storage->is_writable ) {
         $self->_throw_error( 'Cannot write to a readonly filehandle' );
@@ -486,6 +487,7 @@ sub FETCH {
     ##
     my $self = shift->_get_self;
     my ($key) = @_;
+    warn "FETCH($self,$key)\n" if DEBUG;
 
     ##
     # Request shared lock for reading
@@ -509,6 +511,7 @@ sub DELETE {
     ##
     my $self = shift->_get_self;
     my ($key) = @_;
+    warn "DELETE($self,$key)\n" if DEBUG;
 
     unless ( $self->_storage->is_writable ) {
         $self->_throw_error( 'Cannot write to a readonly filehandle' );
@@ -539,6 +542,7 @@ sub EXISTS {
     ##
     my $self = shift->_get_self;
     my ($key) = @_;
+    warn "EXISTS($self,$key)\n" if DEBUG;
 
     ##
     # Request shared lock for reading
@@ -557,6 +561,7 @@ sub CLEAR {
     # Clear all keys from hash, or all elements from array.
     ##
     my $self = shift->_get_self;
+    warn "CLEAR($self)\n" if DEBUG;
 
     unless ( $self->_storage->is_writable ) {
         $self->_throw_error( 'Cannot write to a readonly filehandle' );