10
plan skip_all => "this is Perl $], skipping test\n"
13
eval { require Data::Dumper ; };
15
plan skip_all => "Data::Dumper is not installed on this system.\n";
19
if ($Data::Dumper::VERSION < 2.08) {
20
plan skip_all => "Data::Dumper 2.08 or better required (found $Data::Dumper::VERSION).\n";
23
eval { require MLDBM ; };
25
plan skip_all => "MLDBM is not installed on this system.\n";
38
use MLDBM qw(BerkeleyDB::Btree) ;
43
my $lex = new LexFile $filename;
45
$MLDBM::UseDB = "BerkeleyDB::Btree" ;
47
my $db = tie %o, 'MLDBM', -Filename => $filename,
51
ok $db->type() == DB_BTREE ;
59
@o{qw(a b c)} = ($a, $b, $c);
60
$o{d} = "{once upon a time}";
64
my $struct = [@o{qw(a b c)}];
65
ok ::_compare([$a, $b, $c], $struct);
66
ok $o{d} eq "{once upon a time}" ;
68
ok $o{f} eq 1024.1024 ;
77
use MLDBM qw(BerkeleyDB::Hash) ;
81
my $lex = new LexFile $filename;
84
$MLDBM::UseDB = "BerkeleyDB::Hash" ;
86
my $db = tie %o, 'MLDBM', -Filename => $filename,
90
::ok $db->type() == DB_HASH ;
99
@o{qw(a b c)} = ($a, $b, $c);
100
$o{d} = "{once upon a time}";
104
my $struct = [@o{qw(a b c)}];
105
::ok ::_compare([$a, $b, $c], $struct);
106
::ok $o{d} eq "{once upon a time}" ;
108
::ok $o{f} eq 1024.1024 ;