| 1 | package Tie::Hash::Sorted::XS; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | ▶ | use 5.014000; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 1 | ▶ | use Tree::SizeBalanced; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 1 | our $VERSION = '0.000_001'; | |||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 2 | ▶ | sub TIEHASH { | ||||||||||||||||||
|
Subroutine
TIEHASH: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 12 | 2 | my ($class, $tree) = @_; | |||||||||||||||||||
| 13 | 2 | ▶ | $tree //= Tree::SizeBalanced::str_any->new; | ||||||||||||||||||
|
Condition66%2/3
$tree //= "Tree::SizeBalanced::str_any"->new
MC/DC0%0/2
$tree //= "Tree::SizeBalanced::str_any"->new
$tree
"Tree::SizeBalanced::str_any"->new
Truth table66%2/3
A //= B
A= $treeB= "Tree::SizeBalanced::str_any"->new
| |||||||||||||||||||||
| 14 | 2 | bless \$tree, $class | |||||||||||||||||||
| 15 | } | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 4 | ▶ | sub FETCH { | ||||||||||||||||||
|
Subroutine
FETCH: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 4 | my ($self, $key) = @_; | |||||||||||||||||||
| 19 | 4 | my ($k, $v) = $$self->find($key); | |||||||||||||||||||
| 20 | 4 | $v | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 6 | ▶ | sub STORE { | ||||||||||||||||||
|
Subroutine
STORE: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 24 | 6 | my ($self, $key, $value) = @_; | |||||||||||||||||||
| 25 | 6 | $$self->delete($key); | |||||||||||||||||||
| 26 | 6 | $$self->insert($key, $value); | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | sub DELETE { | ||||||||||||||||||
|
Subroutine
DELETE: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 30 | 0 | my ($self, $key) = @_; | |||||||||||||||||||
| 31 | 0 | $$self->delete($key); | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | # sub CLEAR unimplemented | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | 0 | ▶ | sub EXISTS { | ||||||||||||||||||
|
Subroutine
EXISTS: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 37 | 0 | my ($self, $key) = @_; | |||||||||||||||||||
| 38 | 0 | my @list = $$self->find($key); | |||||||||||||||||||
| 39 | 0 | @list > 0; | |||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 3 | ▶ | sub FIRSTKEY { | ||||||||||||||||||
|
Subroutine
FIRSTKEY: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 43 | 3 | my ($self) = @_; | |||||||||||||||||||
| 44 | 3 | $$self->find_min | |||||||||||||||||||
| 45 | } | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 9 | ▶ | sub NEXTKEY { | ||||||||||||||||||
|
Subroutine
NEXTKEY: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 48 | 9 | my ($self, $lastkey) = @_; | |||||||||||||||||||
| 49 | 9 | $$self->find_gt($lastkey); | |||||||||||||||||||
| 50 | } | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | 0 | ▶ | sub SCALAR { | ||||||||||||||||||
|
Subroutine
SCALAR: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 53 | 0 | my ($self) = @_; | |||||||||||||||||||
| 54 | 0 | $$self->size | |||||||||||||||||||
| 55 | } | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | 1 | 1; | |||||||||||||||||||
| 58 | __END__ | ||||||||||||||||||||