2 use warnings FATAL => 'all';
5 use t::common qw( new_dbm );
9 my $dbm_factory = new_dbm();
10 while ( my $dbm_maker = $dbm_factory->() ) {
16 my $db = $dbm_maker->();
18 $db->{key1} = "value1";
21 # clone db handle, make sure both are usable
23 $clone = $db->clone();
25 is($clone->{key1}, "value1");
27 $clone->{key2} = "value2";
28 $db->{key3} = "value3";
30 is($db->{key1}, "value1");
31 is($db->{key2}, "value2");
32 is($db->{key3}, "value3");
34 is($clone->{key1}, "value1");
35 is($clone->{key2}, "value2");
36 is($clone->{key3}, "value3");
39 is($clone->{key1}, "value1");
40 is($clone->{key2}, "value2");
41 is($clone->{key3}, "value3");
45 my $db = $dbm_maker->();
47 is($db->{key1}, "value1");
48 is($db->{key2}, "value2");
49 is($db->{key3}, "value3");