| 1 | 4 | ▶ | use utf8; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 2 | 4 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 4 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | package DR::Msgpuck::Bool; | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | use overload | ||||||||||||||||||||
| 9 | 0 | ▶ | bool => sub { ${ $_[0] } }, | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.5
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 10 | 0 | ▶ | int => sub { ${ $_[0] } }, | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 11 | 0 | ▶ | '!' => sub { $_[0]->new(!${ $_[0] }) }, | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 12 | 2 | ▶ | '""' => sub { ${ $_[0] } }, | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | 4 | ; | |||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 0 | ▶ | sub TO_JSON { | ||||||||||||||||||
|
Subroutine
TO_JSON: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 16 | 0 | my ($self) = @_; | |||||||||||||||||||
| 17 | 0 | ▶ | $$self ? 'true' : 'false'; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 18 | } | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 14 | ▶ | sub TO_MSGPACK { | ||||||||||||||||||
|
Subroutine
TO_MSGPACK: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 21 | 14 | my ($self) = @_; | |||||||||||||||||||
| 22 | 14 | ▶ | pack 'C', $$self ? 0xC3 : 0xC2; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 23 | } | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 6 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 26 | 6 | my ($class, $v) = @_; | |||||||||||||||||||
| 27 | 6 | ▶ | $v = $v ? 1 : 0; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 28 | 6 | ▶ | bless \$v => ref($class) || $class; | ||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 29 | } | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | package DR::Msgpuck::True; | ||||||||||||||||||||
| 32 | 4 | ▶ | BEGIN { our @ISA = ('DR::Msgpuck::Bool'); } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 35 | 3 | my ($class) = @_; | |||||||||||||||||||
| 36 | 3 | $class->SUPER::new(1); | |||||||||||||||||||
| 37 | } | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | package DR::Msgpuck::False; | ||||||||||||||||||||
| 40 | 4 | ▶ | BEGIN { our @ISA = ('DR::Msgpuck::Bool'); } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 43 | 3 | my ($class) = @_; | |||||||||||||||||||
| 44 | 3 | $class->SUPER::new(0); | |||||||||||||||||||
| 45 | } | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 4 | 1; | |||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | __END__ | ||||||||||||||||||||