| 1 | 2 | ▶ | use utf8; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | package DR::Msgpuck::Num; | ||||||||||||||||||||
| 6 | 2 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | 2 | ▶ | use Scalar::Util (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | use overload | ||||||||||||||||||||
| 9 | 0 | ▶ | bool => sub { ${ $_[0] } ? 1 : 0 }, | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=3.3
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||||||||||||
| 10 | 0 | ▶ | int => sub { int ${ $_[0] } }, | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 11 | 0 | ▶ | '""' => sub { ${ $_[0] } }, | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 12 | 2 | ; | |||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 5 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=12.5
Pod
undocumented
| |||||||||||||||||||||
| 15 | 5 | my ($class, $v) = @_; | |||||||||||||||||||
| 16 | 5 | ▶ | croak "Argument doesn't look like number" | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 17 | unless Scalar::Util::looks_like_number $v; | ||||||||||||||||||||
| 18 | 5 | ▶ | 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
| |||||||||||||||||||||
| 19 | } | ||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 5 | ▶ | sub TO_MSGPACK { | ||||||||||||||||||
|
Subroutine
TO_MSGPACK: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 22 | 5 | require DR::Msgpuck; | |||||||||||||||||||
| 23 | 5 | my ($self) = @_; | |||||||||||||||||||
| 24 | 5 | DR::Msgpuck::msgpack($$self); | |||||||||||||||||||
| 25 | } | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 2 | 1; | |||||||||||||||||||