line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
Cache::Memory::HeapElem - wrapper for Heap::Elem that stores keys |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 DESCRIPTION |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
For internal use by Cache::Memory only. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=cut |
10
|
|
|
|
|
|
|
package Cache::Memory::HeapElem; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
require 5.006; |
13
|
6
|
|
|
6
|
|
24
|
use strict; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
193
|
|
14
|
6
|
|
|
6
|
|
27
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
163
|
|
15
|
6
|
|
|
6
|
|
2635
|
use Heap::Elem; |
|
6
|
|
|
|
|
1190
|
|
|
6
|
|
|
|
|
1007
|
|
16
|
|
|
|
|
|
|
our @ISA = qw(Heap::Elem); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
491
|
|
|
491
|
1
|
394
|
my $class = shift; |
20
|
491
|
|
|
|
|
492
|
my ($namespace, $key, $value) = @_; |
21
|
491
|
|
|
|
|
1495
|
return bless [ $value, $namespace, $key, undef ], $class; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub val { |
25
|
32
|
|
|
32
|
1
|
41
|
my $self = shift; |
26
|
32
|
100
|
|
|
|
143
|
return @_ ? ($self->[0] = shift) : $self->[0]; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub namespace { |
30
|
9
|
|
|
9
|
0
|
12
|
my $self = shift; |
31
|
9
|
|
|
|
|
24
|
return $self->[1]; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub key { |
35
|
17
|
|
|
17
|
0
|
14
|
my $self = shift; |
36
|
17
|
|
|
|
|
47
|
return $self->[2]; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub heap { |
40
|
1486
|
|
|
1486
|
1
|
7769
|
my $self = shift; |
41
|
1486
|
100
|
|
|
|
2990
|
return @_ ? ($self->[3] = shift) : $self->[3]; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub cmp { |
45
|
2638
|
|
|
2638
|
1
|
40381
|
my $self = shift; |
46
|
2638
|
|
|
|
|
1990
|
my $other = shift; |
47
|
2638
|
|
|
|
|
3971
|
return $self->[0] <=> $other->[0]; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
__END__ |