[Rt-commit] [svn] r1760 - in Cache-Simple-TimedExpiry: . inc/Module
inc/Module/Install lib/Cache/Simple
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Tue Nov 9 00:20:40 EST 2004
Author: jesse
Date: Tue Nov 9 00:20:39 2004
New Revision: 1760
Modified:
Cache-Simple-TimedExpiry/ (props changed)
Cache-Simple-TimedExpiry/META.yml
Cache-Simple-TimedExpiry/Makefile
Cache-Simple-TimedExpiry/inc/Module/Install.pm
Cache-Simple-TimedExpiry/inc/Module/Install/Base.pm
Cache-Simple-TimedExpiry/inc/Module/Install/Can.pm
Cache-Simple-TimedExpiry/inc/Module/Install/Fetch.pm
Cache-Simple-TimedExpiry/inc/Module/Install/Makefile.pm
Cache-Simple-TimedExpiry/inc/Module/Install/Metadata.pm
Cache-Simple-TimedExpiry/inc/Module/Install/Win32.pm
Cache-Simple-TimedExpiry/inc/Module/Install/WriteAll.pm
Cache-Simple-TimedExpiry/lib/Cache/Simple/TimedExpiry.pm
Log:
r8940 at tinbook: jesse | 2004-11-08T16:21:33.120402Z
r8953 at tinbook: jesse | 2004-11-09T05:14:40.743613Z
removed a bogus comment
Modified: Cache-Simple-TimedExpiry/META.yml
==============================================================================
--- Cache-Simple-TimedExpiry/META.yml (original)
+++ Cache-Simple-TimedExpiry/META.yml Tue Nov 9 00:20:39 2004
@@ -9,4 +9,4 @@
no_index:
directory:
- inc
-generated_by: Module::Install version 0.33
+generated_by: Module::Install version 0.36
Modified: Cache-Simple-TimedExpiry/Makefile
==============================================================================
--- Cache-Simple-TimedExpiry/Makefile (original)
+++ Cache-Simple-TimedExpiry/Makefile Tue Nov 9 00:20:39 2004
@@ -26,7 +26,7 @@
# --- MakeMaker const_config section:
-# These definitions are from config.sh (via /opt/perl-5.8.3/lib/5.8.3/darwin-2level/Config.pm)
+# These definitions are from config.sh (via /opt/perl-5.8.5/lib/5.8.5/darwin-2level/Config.pm)
# They may have been overridden via Makefile.PL or on the command line
AR = ar
@@ -42,10 +42,10 @@
LIB_EXT = .a
OBJ_EXT = .o
OSNAME = darwin
-OSVERS = 7.3.0
+OSVERS = 7.5.0
RANLIB = /usr/bin/ar ts
-SITELIBEXP = /opt/perl-5.8.3/lib/site_perl/5.8.3
-SITEARCHEXP = /opt/perl-5.8.3/lib/site_perl/5.8.3/darwin-2level
+SITELIBEXP = /opt/perl-5.8.5/lib/site_perl/5.8.5
+SITEARCHEXP = /opt/perl-5.8.5/lib/site_perl/5.8.5/darwin-2level
SO = dylib
EXE_EXT =
FULL_AR = /usr/bin/ar
@@ -76,18 +76,18 @@
INSTALLDIRS = site
DESTDIR =
PREFIX =
-PERLPREFIX = /opt/perl-5.8.3
-SITEPREFIX = /opt/perl-5.8.3
+PERLPREFIX = /opt/perl-5.8.5
+SITEPREFIX = /opt/perl-5.8.5
VENDORPREFIX =
-INSTALLPRIVLIB = $(PERLPREFIX)/lib/5.8.3
+INSTALLPRIVLIB = $(PERLPREFIX)/lib/5.8.5
DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
-INSTALLSITELIB = $(SITEPREFIX)/lib/site_perl/5.8.3
+INSTALLSITELIB = $(SITEPREFIX)/lib/site_perl/5.8.5
DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
INSTALLVENDORLIB =
DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
-INSTALLARCHLIB = $(PERLPREFIX)/lib/5.8.3/darwin-2level
+INSTALLARCHLIB = $(PERLPREFIX)/lib/5.8.5/darwin-2level
DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
-INSTALLSITEARCH = $(SITEPREFIX)/lib/site_perl/5.8.3/darwin-2level
+INSTALLSITEARCH = $(SITEPREFIX)/lib/site_perl/5.8.5/darwin-2level
DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
INSTALLVENDORARCH =
DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
@@ -111,16 +111,16 @@
DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
INSTALLVENDORMAN3DIR =
DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
-PERL_LIB = /opt/perl-5.8.3/lib/5.8.3
-PERL_ARCHLIB = /opt/perl-5.8.3/lib/5.8.3/darwin-2level
+PERL_LIB = /opt/perl-5.8.5/lib/5.8.5
+PERL_ARCHLIB = /opt/perl-5.8.5/lib/5.8.5/darwin-2level
LIBPERL_A = libperl.a
FIRST_MAKEFILE = Makefile
MAKEFILE_OLD = $(FIRST_MAKEFILE).old
MAKE_APERL_FILE = $(FIRST_MAKEFILE).aperl
PERLMAINCC = $(CC)
-PERL_INC = /opt/perl-5.8.3/lib/5.8.3/darwin-2level/CORE
-PERL = /sw/bin/perl -Iinc
-FULLPERL = /sw/bin/perl -Iinc
+PERL_INC = /opt/perl-5.8.5/lib/5.8.5/darwin-2level/CORE
+PERL = /opt/perl-5.8.5/bin/perl -Iinc
+FULLPERL = /opt/perl-5.8.5/bin/perl -Iinc
ABSPERL = $(PERL)
PERLRUN = $(PERL)
FULLPERLRUN = $(FULLPERL)
@@ -132,7 +132,7 @@
PERM_RW = 644
PERM_RWX = 755
-MAKEMAKER = /opt/perl-5.8.3/lib/5.8.3/ExtUtils/MakeMaker.pm
+MAKEMAKER = /opt/perl-5.8.5/lib/5.8.5/ExtUtils/MakeMaker.pm
MM_VERSION = 6.17
MM_REVISION = 1.133
@@ -311,21 +311,21 @@
config :: $(INST_AUTODIR)$(DIRFILESEP).exists
$(NOECHO) $(NOOP)
-$(INST_AUTODIR)/.exists :: /opt/perl-5.8.3/lib/5.8.3/darwin-2level/CORE/perl.h
+$(INST_AUTODIR)/.exists :: /opt/perl-5.8.5/lib/5.8.5/darwin-2level/CORE/perl.h
$(NOECHO) $(MKPATH) $(INST_AUTODIR)
- $(NOECHO) $(EQUALIZE_TIMESTAMP) /opt/perl-5.8.3/lib/5.8.3/darwin-2level/CORE/perl.h $(INST_AUTODIR)/.exists
+ $(NOECHO) $(EQUALIZE_TIMESTAMP) /opt/perl-5.8.5/lib/5.8.5/darwin-2level/CORE/perl.h $(INST_AUTODIR)/.exists
-$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_AUTODIR)
-$(INST_LIBDIR)/.exists :: /opt/perl-5.8.3/lib/5.8.3/darwin-2level/CORE/perl.h
+$(INST_LIBDIR)/.exists :: /opt/perl-5.8.5/lib/5.8.5/darwin-2level/CORE/perl.h
$(NOECHO) $(MKPATH) $(INST_LIBDIR)
- $(NOECHO) $(EQUALIZE_TIMESTAMP) /opt/perl-5.8.3/lib/5.8.3/darwin-2level/CORE/perl.h $(INST_LIBDIR)/.exists
+ $(NOECHO) $(EQUALIZE_TIMESTAMP) /opt/perl-5.8.5/lib/5.8.5/darwin-2level/CORE/perl.h $(INST_LIBDIR)/.exists
-$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_LIBDIR)
-$(INST_ARCHAUTODIR)/.exists :: /opt/perl-5.8.3/lib/5.8.3/darwin-2level/CORE/perl.h
+$(INST_ARCHAUTODIR)/.exists :: /opt/perl-5.8.5/lib/5.8.5/darwin-2level/CORE/perl.h
$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
- $(NOECHO) $(EQUALIZE_TIMESTAMP) /opt/perl-5.8.3/lib/5.8.3/darwin-2level/CORE/perl.h $(INST_ARCHAUTODIR)/.exists
+ $(NOECHO) $(EQUALIZE_TIMESTAMP) /opt/perl-5.8.5/lib/5.8.5/darwin-2level/CORE/perl.h $(INST_ARCHAUTODIR)/.exists
-$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_ARCHAUTODIR)
@@ -333,9 +333,9 @@
$(NOECHO) $(NOOP)
-$(INST_MAN3DIR)/.exists :: /opt/perl-5.8.3/lib/5.8.3/darwin-2level/CORE/perl.h
+$(INST_MAN3DIR)/.exists :: /opt/perl-5.8.5/lib/5.8.5/darwin-2level/CORE/perl.h
$(NOECHO) $(MKPATH) $(INST_MAN3DIR)
- $(NOECHO) $(EQUALIZE_TIMESTAMP) /opt/perl-5.8.3/lib/5.8.3/darwin-2level/CORE/perl.h $(INST_MAN3DIR)/.exists
+ $(NOECHO) $(EQUALIZE_TIMESTAMP) /opt/perl-5.8.5/lib/5.8.5/darwin-2level/CORE/perl.h $(INST_MAN3DIR)/.exists
-$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_MAN3DIR)
@@ -654,7 +654,7 @@
# --- MakeMaker makeaperl section ---
MAP_TARGET = perl
-FULLPERL = /sw/bin/perl
+FULLPERL = /opt/perl-5.8.5/bin/perl
$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
$(MAKE) -f $(MAKE_APERL_FILE) $@
@@ -720,7 +720,7 @@
# End.
-# Postamble by Module::Install 0.33
+# Postamble by Module::Install 0.36
# --- Module::Install::Admin::Makefile section:
realclean purge ::
Modified: Cache-Simple-TimedExpiry/inc/Module/Install.pm
==============================================================================
--- Cache-Simple-TimedExpiry/inc/Module/Install.pm (original)
+++ Cache-Simple-TimedExpiry/inc/Module/Install.pm Tue Nov 9 00:20:39 2004
@@ -1,9 +1,6 @@
-#line 1 "inc/Module/Install.pm - /opt/perl-5.8.3/lib/site_perl/5.8.3/Module/Install.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install.pm $ $Author: autrijus $
-# $Revision: #67 $ $Change: 1885 $ $DateTime: 2004/03/11 05:55:27 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install.pm - /opt/perl-5.8.5/lib/site_perl/5.8.5/Module/Install.pm"
package Module::Install;
-$VERSION = '0.33';
+$VERSION = '0.36';
die << "." unless $INC{join('/', inc => split(/::/, __PACKAGE__)).'.pm'};
Please invoke ${\__PACKAGE__} with:
@@ -22,6 +19,7 @@
use File::Path ();
@inc::Module::Install::ISA = 'Module::Install';
+*inc::Module::Install::VERSION = *VERSION;
#line 129
@@ -168,4 +166,4 @@
__END__
-#line 614
+#line 617
Modified: Cache-Simple-TimedExpiry/inc/Module/Install/Base.pm
==============================================================================
--- Cache-Simple-TimedExpiry/inc/Module/Install/Base.pm (original)
+++ Cache-Simple-TimedExpiry/inc/Module/Install/Base.pm Tue Nov 9 00:20:39 2004
@@ -1,10 +1,7 @@
-#line 1 "inc/Module/Install/Base.pm - /opt/perl-5.8.3/lib/site_perl/5.8.3/Module/Install/Base.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Base.pm $ $Author: autrijus $
-# $Revision: #10 $ $Change: 1847 $ $DateTime: 2003/12/31 23:14:54 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Base.pm - /opt/perl-5.8.5/lib/site_perl/5.8.5/Module/Install/Base.pm"
package Module::Install::Base;
-#line 31
+#line 28
sub new {
my ($class, %args) = @_;
@@ -18,18 +15,18 @@
bless(\%args, $class);
}
-#line 49
+#line 46
sub AUTOLOAD {
my $self = shift;
goto &{$self->_top->autoload};
}
-#line 60
+#line 57
sub _top { $_[0]->{_top} }
-#line 71
+#line 68
sub admin {
my $self = shift;
@@ -54,4 +51,4 @@
__END__
-#line 115
+#line 112
Modified: Cache-Simple-TimedExpiry/inc/Module/Install/Can.pm
==============================================================================
--- Cache-Simple-TimedExpiry/inc/Module/Install/Can.pm (original)
+++ Cache-Simple-TimedExpiry/inc/Module/Install/Can.pm Tue Nov 9 00:20:39 2004
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/Can.pm - /opt/perl-5.8.3/lib/site_perl/5.8.3/Module/Install/Can.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Can.pm $ $Author: autrijus $
-# $Revision: #6 $ $Change: 1840 $ $DateTime: 2003/12/28 19:42:02 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Can.pm - /opt/perl-5.8.5/lib/site_perl/5.8.5/Module/Install/Can.pm"
package Module::Install::Can;
use Module::Install::Base; @ISA = qw(Module::Install::Base);
$VERSION = '0.01';
Modified: Cache-Simple-TimedExpiry/inc/Module/Install/Fetch.pm
==============================================================================
--- Cache-Simple-TimedExpiry/inc/Module/Install/Fetch.pm (original)
+++ Cache-Simple-TimedExpiry/inc/Module/Install/Fetch.pm Tue Nov 9 00:20:39 2004
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/Fetch.pm - /opt/perl-5.8.3/lib/site_perl/5.8.3/Module/Install/Fetch.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Fetch.pm $ $Author: autrijus $
-# $Revision: #8 $ $Change: 1374 $ $DateTime: 2003/03/18 11:50:15 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Fetch.pm - /opt/perl-5.8.5/lib/site_perl/5.8.5/Module/Install/Fetch.pm"
package Module::Install::Fetch;
use Module::Install::Base; @ISA = qw(Module::Install::Base);
Modified: Cache-Simple-TimedExpiry/inc/Module/Install/Makefile.pm
==============================================================================
--- Cache-Simple-TimedExpiry/inc/Module/Install/Makefile.pm (original)
+++ Cache-Simple-TimedExpiry/inc/Module/Install/Makefile.pm Tue Nov 9 00:20:39 2004
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/Makefile.pm - /opt/perl-5.8.3/lib/site_perl/5.8.3/Module/Install/Makefile.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Makefile.pm $ $Author: autrijus $
-# $Revision: #53 $ $Change: 1847 $ $DateTime: 2003/12/31 23:14:54 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Makefile.pm - /opt/perl-5.8.5/lib/site_perl/5.8.5/Module/Install/Makefile.pm"
package Module::Install::Makefile;
use Module::Install::Base; @ISA = qw(Module::Install::Base);
@@ -143,4 +140,4 @@
__END__
-#line 276
+#line 273
Modified: Cache-Simple-TimedExpiry/inc/Module/Install/Metadata.pm
==============================================================================
--- Cache-Simple-TimedExpiry/inc/Module/Install/Metadata.pm (original)
+++ Cache-Simple-TimedExpiry/inc/Module/Install/Metadata.pm Tue Nov 9 00:20:39 2004
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/Metadata.pm - /opt/perl-5.8.3/lib/site_perl/5.8.3/Module/Install/Metadata.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Metadata.pm $ $Author: autrijus $
-# $Revision: #32 $ $Change: 1885 $ $DateTime: 2004/03/11 05:55:27 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Metadata.pm - /opt/perl-5.8.5/lib/site_perl/5.8.5/Module/Install/Metadata.pm"
package Module::Install::Metadata;
use Module::Install::Base; @ISA = qw(Module::Install::Base);
Modified: Cache-Simple-TimedExpiry/inc/Module/Install/Win32.pm
==============================================================================
--- Cache-Simple-TimedExpiry/inc/Module/Install/Win32.pm (original)
+++ Cache-Simple-TimedExpiry/inc/Module/Install/Win32.pm Tue Nov 9 00:20:39 2004
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/Win32.pm - /opt/perl-5.8.3/lib/site_perl/5.8.3/Module/Install/Win32.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Win32.pm $ $Author: autrijus $
-# $Revision: #9 $ $Change: 1789 $ $DateTime: 2003/11/11 01:22:54 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Win32.pm - /opt/perl-5.8.5/lib/site_perl/5.8.5/Module/Install/Win32.pm"
package Module::Install::Win32;
use Module::Install::Base; @ISA = qw(Module::Install::Base);
Modified: Cache-Simple-TimedExpiry/inc/Module/Install/WriteAll.pm
==============================================================================
--- Cache-Simple-TimedExpiry/inc/Module/Install/WriteAll.pm (original)
+++ Cache-Simple-TimedExpiry/inc/Module/Install/WriteAll.pm Tue Nov 9 00:20:39 2004
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/WriteAll.pm - /opt/perl-5.8.3/lib/site_perl/5.8.3/Module/Install/WriteAll.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/WriteAll.pm $ $Author: autrijus $
-# $Revision: #3 $ $Change: 1885 $ $DateTime: 2004/03/11 05:55:27 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/WriteAll.pm - /opt/perl-5.8.5/lib/site_perl/5.8.5/Module/Install/WriteAll.pm"
package Module::Install::WriteAll;
use Module::Install::Base; @ISA = qw(Module::Install::Base);
Modified: Cache-Simple-TimedExpiry/lib/Cache/Simple/TimedExpiry.pm
==============================================================================
--- Cache-Simple-TimedExpiry/lib/Cache/Simple/TimedExpiry.pm (original)
+++ Cache-Simple-TimedExpiry/lib/Cache/Simple/TimedExpiry.pm Tue Nov 9 00:20:39 2004
@@ -1,4 +1,3 @@
-# Tie::Hash::Expire::Dumb
package Cache::Simple::TimedExpiry;
use strict;
@@ -9,6 +8,7 @@
# 0 - expiration delay
# 1 - hash
# 2 - expiration queue
+# 3 - last expiration
=head2 new
@@ -18,7 +18,7 @@
sub new {
- bless [2,{},[]], "Cache::Simple::TimedExpiry";
+ bless [2,{},[],0], "Cache::Simple::TimedExpiry";
}
@@ -60,7 +60,9 @@
sub fetch ($$) {
my ($self,$key) = @_;
- $self->expire();
+ my $time = time;
+ # Only expire
+ $self->expire($time) if ($time > $self->[3]);
unless ( $self->has_key($key)) {
return undef;
}
@@ -79,17 +81,22 @@
sub set ($$$) {
my ($self,$key,$value) = @_;
- $self->expire();
+ my $time = time;
+ # Only expire
+ $self->expire($time) if ($time > $self->[3]);
$self->[1]->{$key} = $value;
push @{$self->[2]}, [ time, $key ];
}
-sub expire ($) {
- my ($self) = @_;
+sub expire ($$) {
+ my $self = shift;
+ my $time = shift;
+
+ $self->[3] = $time;
- my $oldest_nonexpired_entry = (time - $self->[0]);
+ my $oldest_nonexpired_entry = ($time - $self->[0]);
return unless defined $self->[2]->[0]; # do we have an element in the array?
@@ -106,9 +113,11 @@
}
sub elements ($) { # keys
- my ($self) = @_;
+ my $self = shift;
+ my $time = time;
+ # Only expire
+ $self->expire($time) if ($time > $self->[3]);
- $self->expire();
return keys %{$self->[1]};
}
More information about the Rt-commit
mailing list