line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tie::Hash::Sorted::XS; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
53755
|
use 5.014000; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
16
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
650
|
use Tree::SizeBalanced; |
|
1
|
|
|
|
|
16483
|
|
|
1
|
|
|
|
|
270
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.000_001'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub TIEHASH { |
12
|
2
|
|
|
2
|
|
534
|
my ($class, $tree) = @_; |
13
|
2
|
|
66
|
|
|
30
|
$tree //= Tree::SizeBalanced::str_any->new; |
14
|
2
|
|
|
|
|
8
|
bless \$tree, $class |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub FETCH { |
18
|
4
|
|
|
4
|
|
809
|
my ($self, $key) = @_; |
19
|
4
|
|
|
|
|
23
|
my ($k, $v) = $$self->find($key); |
20
|
4
|
|
|
|
|
40
|
$v |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub STORE { |
24
|
6
|
|
|
6
|
|
39
|
my ($self, $key, $value) = @_; |
25
|
6
|
|
|
|
|
29
|
$$self->delete($key); |
26
|
6
|
|
|
|
|
37
|
$$self->insert($key, $value); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub DELETE { |
30
|
0
|
|
|
0
|
|
0
|
my ($self, $key) = @_; |
31
|
0
|
|
|
|
|
0
|
$$self->delete($key); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# sub CLEAR unimplemented |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub EXISTS { |
37
|
0
|
|
|
0
|
|
0
|
my ($self, $key) = @_; |
38
|
0
|
|
|
|
|
0
|
my @list = $$self->find($key); |
39
|
0
|
|
|
|
|
0
|
@list > 0; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub FIRSTKEY { |
43
|
3
|
|
|
3
|
|
21
|
my ($self) = @_; |
44
|
3
|
|
|
|
|
15
|
$$self->find_min |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub NEXTKEY { |
48
|
9
|
|
|
9
|
|
30
|
my ($self, $lastkey) = @_; |
49
|
9
|
|
|
|
|
24
|
$$self->find_gt($lastkey); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub SCALAR { |
53
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
54
|
0
|
|
|
|
|
|
$$self->size |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
__END__ |