1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
use strict;
use warnings FATAL => 'all';
use Test::More;
use t::common qw( new_fh );
diag "Testing DBM::Deep against Perl $] located at $^X";
use_ok( 'DBM::Deep' );
##
# basic file open
##
my ($fh, $filename) = new_fh();
my $db = eval {
local $SIG{__DIE__};
DBM::Deep->new( $filename );
}; if ( $@ ) {
diag "ERROR: $@";
Test::More->builder->BAIL_OUT( "Opening a new file fails." );
}
isa_ok( $db, 'DBM::Deep' );
ok(1, "We can successfully open a file!" );
$db->{foo} = 'bar';
is( $db->{foo}, 'bar', 'We can write and read.' );
done_testing;
|