diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-29 18:34:27 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-29 18:34:27 +0000 |
commit | 5189e6feed9c4945d8abd4abe4d194bcee21856d (patch) | |
tree | 477faaf7d4fac90ed740d053728483b5c64e6f3b /lib/Memoize | |
parent | 2f12987e42cb5c4dc29bec6985e2491b4e06657d (diff) | |
download | perl-5189e6feed9c4945d8abd4abe4d194bcee21856d.tar.gz |
Upgrade to Memoize 1.00, from mjd, modulo the Memoize::Saves,
which one has to get from the CPAN distribution.
p4raw-id: //depot/perl@15614
Diffstat (limited to 'lib/Memoize')
-rw-r--r-- | lib/Memoize/Expire.pm | 9 | ||||
-rw-r--r-- | lib/Memoize/README | 7 | ||||
-rw-r--r-- | lib/Memoize/t/expfile.t (renamed from lib/Memoize/t/expire_file.t) | 9 | ||||
-rw-r--r-- | lib/Memoize/t/expmod_n.t (renamed from lib/Memoize/t/expire_module_n.t) | 5 | ||||
-rw-r--r-- | lib/Memoize/t/expmod_t.t (renamed from lib/Memoize/t/expire_module_t.t) | 5 |
5 files changed, 13 insertions, 22 deletions
diff --git a/lib/Memoize/Expire.pm b/lib/Memoize/Expire.pm index b3ab10a69f..97e1aa4420 100644 --- a/lib/Memoize/Expire.pm +++ b/lib/Memoize/Expire.pm @@ -3,7 +3,7 @@ package Memoize::Expire; # require 5.00556; use Carp; $DEBUG = 0; -$VERSION = '0.66'; +$VERSION = '1.00'; # This package will implement expiration by prepending a fixed-length header # to the font of the cached data. The format of the header will be: @@ -311,15 +311,10 @@ the underlying cache so that the user can specify that the cache is also persistent or that it has some other interesting semantics. The example above demonstrates how to do this, as does C<Memoize::Expire>. -Another sample module, C<Memoize::Saves>, is included with this -package. It implements a policy that allows you to specify that -certain function values whould always be looked up afresh. See the -documentation for details. - =head1 ALTERNATIVES Brent Powers has a C<Memoize::ExpireLRU> module that was designed to -wotk with Memoize and provides expiration of least-recently-used data. +work with Memoize and provides expiration of least-recently-used data. The cache is held at a fixed number of entries, and when new data comes in, the least-recently used data is expired. See L<http://search.cpan.org/search?mode=module&query=ExpireLRU>. diff --git a/lib/Memoize/README b/lib/Memoize/README index b7abb5f4c3..552f621236 100644 --- a/lib/Memoize/README +++ b/lib/Memoize/README @@ -1,7 +1,7 @@ Name: Memoize What: Transparently speed up functions by caching return values. -Version: 0.66 +Version: 1.00 Author: Mark-Jason Dominus (mjd-perl-memoize+@plover.com) ################################################################ @@ -25,6 +25,11 @@ If not, please send me a report that mentions which tests failed. The address is: mjd-perl-memoize+@plover.com. ################################################################ +What's new since 0.66: + +Minor documentation and test changes only. + +################################################################ What's new since 0.65: Test changes only. diff --git a/lib/Memoize/t/expire_file.t b/lib/Memoize/t/expfile.t index 78a94d4b9b..9959d00313 100644 --- a/lib/Memoize/t/expire_file.t +++ b/lib/Memoize/t/expfile.t @@ -1,9 +1,6 @@ #!/usr/bin/perl -BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; -} +use lib '..'; use Memoize; my $n = 0; @@ -31,7 +28,7 @@ sub writefile { sub readfile { $READFILE_CALLS++; my $FILE = shift; - open F, "< $FILE" or die "Couldn't read temporary file $FILE: $!"; + open F, "< $FILE" or die "Couldn't write temporary file $FILE: $!"; my $data = <F>; close F; $data; @@ -61,7 +58,7 @@ my $t2 = readfile($FILE); ++$n; print ((($READFILE_CALLS == 1) ? '' : 'not '), "ok $n\n"); ++$n; print ((($t1 eq $t2) ? '' : 'not '), "ok $n\n"); -sleep 3; +sleep 2; writefile($FILE); my $t3 = readfile($FILE); ++$n; print "ok $n\n"; diff --git a/lib/Memoize/t/expire_module_n.t b/lib/Memoize/t/expmod_n.t index e88d2ecb85..7e5505a871 100644 --- a/lib/Memoize/t/expire_module_n.t +++ b/lib/Memoize/t/expmod_n.t @@ -1,9 +1,6 @@ #!/usr/bin/perl -BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; -} +use lib '..'; use Memoize; my $n = 0; diff --git a/lib/Memoize/t/expire_module_t.t b/lib/Memoize/t/expmod_t.t index 73b3f088a4..3cc3de13f8 100644 --- a/lib/Memoize/t/expire_module_t.t +++ b/lib/Memoize/t/expmod_t.t @@ -1,9 +1,6 @@ #!/usr/bin/perl -BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; -} +use lib '..'; use Memoize; BEGIN { eval {require Time::HiRes}; |