5 use Test::More tests => 7;
7 use t::common qw( new_fh );
11 my ($fh, $filename) = new_fh();
12 my $db = DBM::Deep->new( $filename );
16 package My::Tie::Hash;
27 tie %hash, 'My::Tie::Hash';
28 isa_ok( tied(%hash), 'My::Tie::Hash' );
32 } qr/Cannot store something that is tied/, "Cannot store tied hashes";
37 package My::Tie::Array;
50 tie @array, 'My::Tie::Array';
51 isa_ok( tied(@array), 'My::Tie::Array' );
55 } qr/Cannot store something that is tied/, "Cannot store tied arrays";
59 package My::Tie::Scalar;
70 tie $scalar, 'My::Tie::Scalar';
71 isa_ok( tied($scalar), 'My::Tie::Scalar' );
74 $db->{foo} = \$scalar;
75 } qr/Storage of variables of type 'SCALAR' is not supported/, "Cannot store scalar references, let alone tied scalars";