2 use warnings FATAL => 'all';
6 use t::common qw( new_dbm );
13 array1 => [ "elem0", "elem1", "elem2", { foo => 'bar' }, [ 5 ] ],
15 subkey1 => "subvalue1",
16 subkey2 => "subvalue2",
21 sub_obj2 => bless([], 'Foo'),
26 my $dbm_factory = new_dbm( autobless => 1 );
27 while ( my $dbm_maker = $dbm_factory->() ) {
28 my $db = $dbm_maker->();
31 # Create structure in DB
33 $db->import( \%struct );
38 my $compare = $db->export();
45 array1 => [ "elem0", "elem1", "elem2", { foo => 'bar' }, [ 5 ] ],
47 subkey1 => "subvalue1",
48 subkey2 => "subvalue2",
53 sub_obj2 => bless([], 'Foo'),
60 isa_ok( tied(%{$db->{hash1}{subkey3}})->export, 'Foo' );
61 isa_ok( tied(@{$db->{hash1}{subkey3}{sub_obj}})->export, 'Foo' );
62 isa_ok( tied(@{$db->{hash1}{subkey3}{sub_obj}[0]})->export, 'Foo' );
63 isa_ok( tied(@{$db->{hash1}{subkey3}{sub_obj2}})->export, 'Foo' );