r6122@000-443-371 (orig r9951): rkinyon | 2007-09-19 22:33:23 -0400
[dbsrgits/DBM-Deep.git] / lib / DBM / Deep / Array.pm
index 9816303..db84214 100644 (file)
@@ -5,7 +5,7 @@ use 5.006_000;
 use strict;
 use warnings;
 
-our $VERSION = q(1.0001);
+our $VERSION = q(1.0002);
 
 # This is to allow DBM::Deep::Array to handle negative indices on
 # its own. Otherwise, Perl would intercept the call to negative
@@ -251,15 +251,17 @@ sub PUSH {
     return $length;
 }
 
+# XXX This really needs to be something more direct within the file, not a
+# fetch and re-store. -RobK, 2007-09-20
 sub _move_value {
     my $self = shift;
     my ($old_key, $new_key) = @_;
 
     my $val = $self->FETCH( $old_key );
-    if ( eval { $val->isa( 'DBM::Deep::Hash' ) } ) {
+    if ( eval { local $SIG{'__DIE__'}; $val->isa( 'DBM::Deep::Hash' ) } ) {
         $self->STORE( $new_key, { %$val } );
     }
-    elsif ( eval { $val->isa( 'DBM::Deep::Array' ) } ) {
+    elsif ( eval { local $SIG{'__DIE__'}; $val->isa( 'DBM::Deep::Array' ) } ) {
         $self->STORE( $new_key, [ @$val ] );
     }
     else {