2 use warnings FATAL => 'all';
6 use t::common qw( new_dbm );
10 my $dbm_factory = new_dbm();
11 while ( my $dbm_maker = $dbm_factory->() ) {
12 my $db = $dbm_maker->();
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";
60 package My::Tie::Scalar;
71 tie $scalar, 'My::Tie::Scalar';
72 isa_ok( tied($scalar), 'My::Tie::Scalar' );
75 $db->{foo} = \$scalar;
76 } qr/Storage of references of type 'SCALAR' is not supported/, "Cannot store scalar references, let alone tied scalars";