2 # -*- mode: perl; perl-indent-level: 2 -*-
5 use Memoize 0.45 qw(memoize unmemoize);
6 # $Memoize::Storable::Verbose = 0;
8 eval {require Memoize::Storable};
28 eval {require Storable};
38 tryout('Memoize::Storable', $file, 1); # Test 1..4
42 my ($tiepack, $file, $testno) = @_;
44 tie my %cache => $tiepack, $file
48 SCALAR_CACHE => [HASH => \%cache],
54 print (($t1 == 5) ? "ok $testno\n" : "not ok $testno\n");
56 print (($t2 == 5) ? "ok $testno\n" : "not ok $testno\n");
61 # Now something tricky---we'll memoize c23 with the wrong table that
62 # has the 5 already cached.
64 SCALAR_CACHE => [HASH => \%cache],
71 print (($t3 == 5) ? "ok $testno\n" : "not ok $testno\n");
73 print (($t4 == 5) ? "ok $testno\n" : "not ok $testno\n");