Branch Coverage

blib/lib/Data/ParseBinary/Constructs.pm
Criterion Covered Total %
branch 74 124 59.6


line true false branch
24 0 2 unless defined $name
38 2 2 unless exists $$data{$name} and defined $$data{$name}
51 0 0 unless $field_found
65 0 2 if $temp_size > $size
76 0 2 unless $field_found
79 1 1 if ($$self{'size'} > length $string)
95 0 3 unless @subconstructs
117 6 6 if $@
118 5 1 if defined $name
139 11 1 defined $name ? :
144 6 6 if $@
188 16 3 if ($parser->runCodeRef($$self{'condition'})) { }
197 14 6 if ($parser->runCodeRef($$self{'condition'})) { }
314 1 1 unless ($@)
391 0 20 unless $keyfunc and ref $keyfunc and UNIVERSAL::isa($keyfunc, 'CODE')
393 0 20 unless $cases and ref $cases and UNIVERSAL::isa($cases, 'HASH')
399 1 19 if $$self{'default'} and $$self{'default'} == $Data::ParseBinary::BaseConstruct::DefaultPass
406 74 4 if (exists $$self{'cases'}{$key})
409 4 0 if (defined $$self{'default'})
418 0 45 unless defined $value
425 0 33 unless defined $value
434 0 0 if ($size == -1) { }
437 0 0 unless $size == $sub_size
440 0 0 if ($$self{'default'})
442 0 0 unless $size == $sub_size
465 0 285 unless defined $data and not ref $data
479 0 14 unless ref $coderef and UNIVERSAL::isa($coderef, 'CODE')
494 0 50 unless defined $data and not ref $data
562 16 437 if ($stream->isBitStream) { }
571 18 367 if ($stream->isBitStream) { }
583 0 12 unless $sub and $coderef
584 0 12 unless ref $sub and UNIVERSAL::isa($sub, 'Data::ParseBinary::BaseConstruct')
585 0 12 unless ref $coderef and UNIVERSAL::isa($coderef, 'CODE')
608 30 193 if $self->_shouldStop($parser, $value)
616 0 28 unless defined $data and ref $data and UNIVERSAL::isa($data, 'ARRAY')
621 28 183 if $self->_shouldStop($parser, $item)
631 0 40 unless $sub and $coderef
632 0 40 unless ref $sub and UNIVERSAL::isa($sub, 'Data::ParseBinary::BaseConstruct')
633 0 40 unless ref $coderef and UNIVERSAL::isa($coderef, 'CODE')
656 0 137 unless defined $data and ref $data and UNIVERSAL::isa($data, 'ARRAY')
659 1 136 if @$data != $len
672 0 3 unless $sub
673 0 3 unless ref $sub and UNIVERSAL::isa($sub, 'Data::ParseBinary::BaseConstruct')
687 0 3 if (defined $max) { }
693 0 0 if ($@)
694 0 0 if $ix <= $$self{'min'}
707 3 85 if ($@)
708 0 3 if $ix <= $$self{'min'}
720 0 3 unless defined $data and ref $data and UNIVERSAL::isa($data, 'ARRAY')
721 0 3 if @$data < $$self{'min'}
722 0 3 if defined $$self{'max'} and @$data > $$self{'max'}
735 0 8 unless @subconstructs
748 0 160 unless defined $name
759 0 63 unless defined $data and ref $data and UNIVERSAL::isa($data, 'ARRAY')
760 0 63 if @$data > $subs_count
765 162 0 if (defined $name) { }
766 0 162 if $ix >= $subs_count
790 0 102 unless @subconstructs
804 465 3874 unless defined $name
813 0 551 unless defined $data and ref $data and UNIVERSAL::isa($data, 'HASH')
817 2410 394 defined $name ? :
851 0 2669 unless defined $data