| 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
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 105 | my @tag_kv_copy = @tag_kv; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 105 | ▶ | while ( my ($tag, $cr) = splice @tag_kv ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 14 | 105 | ▶ | die "Invalid tag: $tag" if $tag !~ m<\A[0-9]+\z>; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 15 | 104 | ▶ | die "Invalid tag $tag handler: $cr" if defined($cr) && !UNIVERSAL::isa($cr, 'CODE'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $cr and not UNIVERSAL::isa($cr, "CODE")
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")
| |||||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 103 | $self->_set_tag_handlers_backend(@tag_kv_copy); | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 103 | return $self; | |||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 8 | 1; | |||||||||||||||||||||||||||