blib/lib/DR/Msgpuck/Num.pm

filter: Statementstmt 80.6% 25 / 31 Branchbran 25.0% 1 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 72.7% 8 / 11 Podpod 0.0% 0 / 2 totaltotal 66.0% 35 / 53 CC 4 SCAR 8.8
CC
4
Cov
71%
__ANON__
6.0
new
3.5
__ANON__
2.0
CRAP 2.4
« blib/lib/DR/Msgpuck/Str.pm ↑ Summary blib/lib/DR/Msgpuck/Bool.pm »
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
BranchTrueFalseTotal
${$_[0];} ? : 0 0 0
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
BranchTrueFalseTotal
unless &Scalar::Util::looks_like_number($v) 0 5 5
17 unless Scalar::Util::looks_like_number $v;
18 5 ▶ bless \$v => ref($class) || $class;
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
050
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
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;
« blib/lib/DR/Msgpuck/Str.pm ↑ Summary blib/lib/DR/Msgpuck/Bool.pm »