PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/Cache/LRU/Peekable.pm

http://github.com/motemen/Teto
Perl | 15 lines | 11 code | 3 blank | 1 comment | 0 complexity | 804494b20c6f6fc910e0cea6875c23b5 MD5 | raw file
 1package Cache::LRU::Peekable;
 2use strict;
 3use warnings;
 4use parent 'Cache::LRU';
 5
 6sub peek {
 7    my ($self, $key) = @_;
 8    my $value_ref = $self->{_entries}->{$key};
 9    return undef unless $value_ref;
10
11    # no _update_fifo
12    $$value_ref;
13}
14
151;