blib/lib/CBOR/Free/Decoder/Base.pm

filter: Statementstmt 100% 15 / 15 Branchbran 100% 8 / 8 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 96.8% 31 / 32 CC 6 SCAR 15.6
CC
6
Cov
100%
set_tag_handlers
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 4.8
↑ Summary blib/lib/CBOR/Free/AddOne.pm »
1 package CBOR::Free::Decoder::Base;
2  
3 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 106 ▶sub set_tag_handlers {
Subroutine set_tag_handlers: called CC=6 SCAR=17.9
Pod undocumented
7 106 my ($self, @tag_kv) = @_;
8  
9 106 ▶ die "Uneven tag handlers list given!" if @tag_kv % 2;
Branch: 1 branch
BranchTrueFalseTotal
if @tag_kv % 2 1 105 106
10  
11 105 my @tag_kv_copy = @tag_kv;
12  
13 105 ▶ while ( my ($tag, $cr) = splice @tag_kv ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = splice(@tag_kv)) 105 103 208
14 105 ▶ die "Invalid tag: $tag" if $tag !~ m<\A[0-9]+\z>;
Branch: 1 branch
BranchTrueFalseTotal
unless $tag =~ /\A[0-9]+\z/ 1 104 105
15 104 ▶ die "Invalid tag $tag handler: $cr" if defined($cr) && !UNIVERSAL::isa($cr, 'CODE');
Branch: 1 branch
BranchTrueFalseTotal
if defined $cr and not UNIVERSAL::isa($cr, "CODE") 1 103 104
Condition100%3/3
defined $cr and not UNIVERSAL::isa($cr, "CODE")
!ll&&!rl&&r
11021
MC/DC100%2/2
defined $cr and not UNIVERSAL::isa($cr, "CODE")
defined $cr not UNIVERSAL::isa($cr, "CODE")
Truth table100%3/3
A and not(B)
A= defined $crB= not UNIVERSAL::isa($cr, "CODE")
ABresult
0X0
100
111
16 }
17  
18 103 $self->_set_tag_handlers_backend(@tag_kv_copy);
19  
20 103 return $self;
21 }
22  
23 8 1;
↑ Summary blib/lib/CBOR/Free/AddOne.pm »