use strict;
use warnings FATAL => 'all';
+no warnings 'recursion';
our $VERSION = q(1.0019_003);
my $class = shift;
my $args = $class->_get_args( @_ );
my $self;
-
+
if (defined($args->{type}) && $args->{type} eq TYPE_ARRAY) {
$class = 'DBM::Deep::Array';
require DBM::Deep::Array;
*lock = \&lock_exclusive;
sub lock_shared {
my $self = shift->_get_self;
+use Carp qw( cluck ); use Data::Dumper;
+cluck Dumper($self) unless $self->_engine;
return $self->_engine->lock_shared( $self, @_ );
}
$self->lock_exclusive;
$self->_engine->clear_cache;
$self->_copy_node( $db_temp );
+ $self->unlock;
$db_temp->_engine->storage->close;
undef $db_temp;
}
sub clone {
- ##
- # Make copy of object and return
- ##
my $self = shift->_get_self;
return __PACKAGE__->new(
sub rollback {
my $self = shift->_get_self;
+
$self->lock_exclusive;
my $rv = eval {
local $SIG{'__DIE__'};
}
$self->lock_exclusive;
-
- $engine->clear;
+ eval {
+ local $SIG{'__DIE__'};
+ $engine->clear( $self );
+ };
+ my $e = $@;
+ warn "$e\n" if $e;
$self->unlock;
+ die $e if $e;
+
return 1;
}