Tagged 0.981_01 (experimental auditlog)
[dbsrgits/DBM-Deep.git] / t / 25_tie_return_value.t
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' );
24     is( reftype( $obj ), 'HASH', "... and its underlying representation is an HASH" );
25 }