2 # This is just for testing expiration semantics.
3 # It's not actually a very good example of how to write
4 # an expiration module.
6 # If you are looking for an example, I recommend that you look at the
7 # simple example in the Memoize::Expire documentation, or at the
8 # code for Memoize::Expire itself.
10 # If you have questions, I will be happy to answer them if you
11 # send them to mjd-perl/memoize+@plover.com.
13 package Memoize::ExpireTest;
19 bless \%cache => $pack;
23 my ($cache, $key) = @_;
24 exists $cache->{$key} ? 1 : 0;
28 my ($cache, $key) = @_;
33 my ($cache, $key, $val) = @_;
34 $cache->{$key} = $val;