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
|
|
29
|
use strict; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
304
|
|
14
|
6
|
|
|
6
|
|
37
|
use warnings; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
209
|
|
15
|
6
|
|
|
6
|
|
5939
|
use Heap::Elem; |
|
6
|
|
|
|
|
3513
|
|
|
6
|
|
|
|
|
1366
|
|
16
|
|
|
|
|
|
|
our @ISA = qw(Heap::Elem); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
491
|
|
|
491
|
1
|
1273
|
my $class = shift; |
20
|
491
|
|
|
|
|
826
|
my ($namespace, $key, $value) = @_; |
21
|
491
|
|
|
|
|
3073
|
return bless [ $value, $namespace, $key, undef ], $class; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub val { |
25
|
32
|
|
|
32
|
1
|
62
|
my $self = shift; |
26
|
32
|
100
|
|
|
|
358
|
return @_ ? ($self->[0] = shift) : $self->[0]; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub namespace { |
30
|
9
|
|
|
9
|
0
|
14
|
my $self = shift; |
31
|
9
|
|
|
|
|
35
|
return $self->[1]; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub key { |
35
|
17
|
|
|
17
|
0
|
24
|
my $self = shift; |
36
|
17
|
|
|
|
|
74
|
return $self->[2]; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub heap { |
40
|
1486
|
|
|
1486
|
1
|
14371
|
my $self = shift; |
41
|
1486
|
100
|
|
|
|
4283
|
return @_ ? ($self->[3] = shift) : $self->[3]; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub cmp { |
45
|
2632
|
|
|
2632
|
1
|
58008
|
my $self = shift; |
46
|
2632
|
|
|
|
|
2898
|
my $other = shift; |
47
|
2632
|
|
|
|
|
6124
|
return $self->[0] <=> $other->[0]; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
__END__ |