Commit | Line | Data |
995d119b |
1 | use strict; |
2 | |
3 | use Test::More tests => 5; |
4 | |
5 | use Scalar::Util qw( reftype ); |
6 | |
7 | use_ok( 'DBM::Deep' ); |
8 | |
9 | { |
10 | unlink "t/test.db"; |
11 | |
12 | my %hash; |
13 | my $obj = tie %hash, 'DBM::Deep', 't/test.db'; |
14 | isa_ok( $obj, 'DBM::Deep' ); |
15 | is( reftype( $obj ), 'HASH', "... and its underlying representation is an HASH" ); |
16 | } |
17 | |
18 | { |
19 | unlink "t/test.db"; |
20 | |
21 | my @array; |
22 | my $obj = tie @array, 'DBM::Deep', 't/test.db'; |
23 | isa_ok( $obj, 'DBM::Deep' ); |
45a5b35d |
24 | is( reftype( $obj ), 'HASH', "... and its underlying representation is an HASH" ); |
995d119b |
25 | } |