33943f3aa50ea655d2818276aef1ea444bca1718
[dbsrgits/DBM-Deep.git] / t / 25_tie_return_value.t
1 use strict;
2
3 use Test::More tests => 5;
4 use t::common qw( new_fh );
5
6 use_ok( 'DBM::Deep' );
7
8 use Scalar::Util qw( reftype );
9
10 {
11     my ($fh, $filename) = new_fh();
12
13     my %hash;
14     my $obj = tie %hash, 'DBM::Deep', $filename;
15     isa_ok( $obj, 'DBM::Deep' );
16     is( reftype( $obj ), 'HASH', "... and its underlying representation is an HASH" );
17 }
18
19 {
20     my ($fh, $filename) = new_fh();
21
22     my @array;
23     my $obj = tie @array, 'DBM::Deep', $filename;
24     isa_ok( $obj, 'DBM::Deep' );
25     is( reftype( $obj ), 'HASH', "... and its underlying representation is an HASH" );
26 }