4 use Memoize 0.45 qw(memoize unmemoize);
21 eval {require GDBM_File};
30 1 while unlink $file, "$file.dir", "$file.pag";
31 tryout('GDBM_File', $file, 1); # Test 1..4
32 1 while unlink $file, "$file.dir", "$file.pag";
36 my ($tiepack, $file, $testno) = @_;
38 tie my %cache => $tiepack, $file, O_RDWR | O_CREAT, 0666
42 SCALAR_CACHE => [HASH => \%cache],
48 print (($t1 == 5) ? "ok $testno\n" : "not ok $testno\n");
50 print (($t2 == 5) ? "ok $testno\n" : "not ok $testno\n");
53 # Now something tricky---we'll memoize c23 with the wrong table that
54 # has the 5 already cached.
56 SCALAR_CACHE => [HASH => \%cache],
63 print (($t3 == 5) ? "ok $testno\n" : "not ok $testno\n");
65 print (($t4 == 5) ? "ok $testno\n" : "not ok $testno\n");