5 use Test::More tests => 6;
7 use t::common qw( new_fh );
14 array1 => [ "elem0", "elem1", "elem2", { foo => 'bar' }, [ 5 ] ],
16 subkey1 => "subvalue1",
17 subkey2 => "subvalue2",
22 sub_obj2 => bless([], 'Foo'),
27 my ($fh, $filename) = new_fh();
28 my $db = DBM::Deep->new({
34 # Create structure in DB
36 $db->import( %struct );
41 my $compare = $db->export();
48 array1 => [ "elem0", "elem1", "elem2", { foo => 'bar' }, [ 5 ] ],
50 subkey1 => "subvalue1",
51 subkey2 => "subvalue2",
56 sub_obj2 => bless([], 'Foo'),
63 isa_ok( tied(%{$db->{hash1}{subkey3}})->export, 'Foo' );
64 isa_ok( tied(@{$db->{hash1}{subkey3}{sub_obj}})->export, 'Foo' );
65 isa_ok( tied(@{$db->{hash1}{subkey3}{sub_obj}[0]})->export, 'Foo' );
66 isa_ok( tied(@{$db->{hash1}{subkey3}{sub_obj2}})->export, 'Foo' );