5 use Test::More tests => 5;
10 my $db = DBM::Deep->new( "t/test.db" );
12 die "ERROR: " . $db->error();
16 my $db2 = DBM::Deep->new( "t/test2.db" );
18 die "ERROR: " . $db2->error();
22 # Create structure in $db
26 subkey1 => "subvalue1",
27 subkey2 => "subvalue2"
31 is( $db->{hash1}{subkey1}, 'subvalue1', "Value imported correctly" );
32 is( $db->{hash1}{subkey2}, 'subvalue2', "Value imported correctly" );
35 # Cross-ref nested hash accross DB objects
37 $db2->{copy} = $db->{hash1};
46 # Make sure $db2 has copy of $db's hash structure
48 is( $db2->{copy}{subkey1}, 'subvalue1', "Value copied correctly" );
49 is( $db2->{copy}{subkey2}, 'subvalue2', "Value copied correctly" );