From: rkinyon Date: Mon, 1 May 2006 02:23:00 +0000 (+0000) Subject: r11686@rob-kinyons-powerbook58: rob | 2006-04-29 23:23:17 -0400 X-Git-Tag: 0-99_03~52 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9a772062baac1b1ec9a0aa9406872509145ed479;p=dbsrgits%2FDBM-Deep.git r11686@rob-kinyons-powerbook58: rob | 2006-04-29 23:23:17 -0400 Fixed export() so that it works with crossreferences --- diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index 005d06a..49e1444 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -210,7 +210,7 @@ sub export { my $c = Scalar::Util::blessed( $self->{parent}->get($self->{parent_key}) ); - if ( $c ) { + if ( $c && !$c->isa( 'DBM::Deep' ) ) { bless $temp, $c; } } diff --git a/t/19_crossref.t b/t/19_crossref.t index aedf5c5..bd432c8 100644 --- a/t/19_crossref.t +++ b/t/19_crossref.t @@ -26,7 +26,6 @@ my $db2 = DBM::Deep->new( $filename2 ); ); is( $db->{hash1}{subkey1}, 'subvalue1', "Value imported correctly" ); is( $db->{hash1}{subkey2}, 'subvalue2', "Value imported correctly" ); - ## # Cross-ref nested hash accross DB objects ##