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({
35 # Create structure in DB
37 $db->import( \%struct );
42 my $compare = $db->export();
49 array1 => [ "elem0", "elem1", "elem2", { foo => 'bar' }, [ 5 ] ],
51 subkey1 => "subvalue1",
52 subkey2 => "subvalue2",
57 sub_obj2 => bless([], 'Foo'),
64 isa_ok( tied(%{$db->{hash1}{subkey3}})->export, 'Foo' );
65 isa_ok( tied(@{$db->{hash1}{subkey3}{sub_obj}})->export, 'Foo' );
66 isa_ok( tied(@{$db->{hash1}{subkey3}{sub_obj}[0]})->export, 'Foo' );
67 isa_ok( tied(@{$db->{hash1}{subkey3}{sub_obj2}})->export, 'Foo' );