Branch Coverage

lib/Encoding/BER.pm
Criterion Covered Total %
branch 160 248 64.5


line true false branch
214 0 0 if (my $f = $me->{'error'}) { }
226 1 0 if (my $f = $me->{'warn'}) { }
238 630 0 unless $me->{'debug'}
253 0 139 unless $CLASS{$class}
254 0 139 unless $TYPE{$type}
291 0 138 unless $me->tag_data_byname($base)
354 64 49 if $me->{'acanonical'} or not $me->behaves_like_a_hash($data)
357 0 113 if ($data->{'type'} eq 'BER_preencoded')
365 5 108 if ($typeval & 32) { }
368 5 0 ref $data->{'value'} ? :
377 1 107 unless ($encfnc)
379 1 0 ref $data->{'type'} ? :
390 112 1 if ($defp and defined $leng) { }
444 1 1 $data->{'value'} ? :
455 44 4 if (_have_math_bigint())
457 22 22 if ref $val and $val->can('as_hex') or length $val > 8
460 22 26 if ($big) { }
463 9 13 $x->is_neg ? :
464 9 13 if ($sign) { }
468 4 5 if length $x & 1
470 4 5 unless $i[0] & 128
474 6 7 if length $x & 1
476 5 8 if $i[0] & 128
480 5 21 $val < 0 ? :
483 26 10 if $val >= -128 and $val < 128
500 12 0 if (_have_math_bigint())
502 6 6 if ref $val and $val->can('bcmp') or length $val > 8
505 6 6 if ($big) { }
508 3 3 if length $x & 1
537 0 29 unless $val
538 0 29 if $val eq 'inf'
539 0 29 if $val eq '-inf'
545 0 29 unless defined &POSIX::frexp
550 7 22 if ($mant < 0)
568 29 0 if ($data->{'flavor'} or $me->{'flavor'})
576 147 277 $c ? :
586 17 12 $exp < 0 ? :
589 29 4 if $exp >= -128 and $exp < 128
596 7 22 $sign ? :
598 4 25 if (@exp == 2)
601 0 29 if (@exp == 3)
604 0 29 if (@exp > 3)
620 0 1 ref $val ? :
621 0 1 if $o[0] eq ''
623 1 0 if (@o > 1)
640 0 1 ref $val ? :
641 0 1 if $o[0] eq ''
656 112 1 if ($tnum < 31)
667 113 0 if $len < 128
668 0 0 if $len < 256
669 0 0 if $len < 4096
670 0 0 if $len < 65536
671 0 0 if $len <= 4294967295
692 2 62 unless (defined $data)
699 3 59 if ($me->behaves_like_an_array($data))
706 1 58 if ($me->behaves_like_a_hash($data))
713 51 7 if ($me->smells_like_a_number($data))
715 48 3 int $data == $data ? :
748 157 93 unless $ALLTAG{$name}
760 250 14 unless $th
763 250 14 unless $th
772 16 20 if ($CLASS{$t})
773 20 0 if ($TYPE{$t})
785 3 110 ref $typd ? :
791 2 111 if ($me->smells_like_a_number($tname))
803 0 111 unless ($th)
806 0 111 unless (ref $th)
816 17 94 if (my $ts = $th->{'type'})
827 0 111 if $rclass and $rclass ne $class
832 15 96 if (my $impl = $th->{'implicit'})
836 15 0 if (ref $th) { }
853 108 5 unless $type & 32
856 4 1 unless $fl
857 0 1 if $fl eq 'DER'
858 1 0 if $fl eq 'CER'
868 37 25 unless ref $d
876 69 94 unless ref $d
879 42 52 if UNIVERSAL::isa($d, 'Math::BigInt')
887 21 150 if ref $d and UNIVERSAL::isa($d, 'Math::BigInt')
928 0 8 unless ($val and defined $val->{'type'})
931 0 0 if $eocp
958 0 32 if $havlen < $tlen
961 2 30 if ($typval & 32) { }
965 2 0 if (defined $datlen) { }
970 0 2 unless $t == $datlen
982 0 2 if ($decfnc) { }
993 30 0 if (defined $datlen) { }
1003 0 0 if ($i == -1)
1016 0 30 unless ($typval or $typmore)
1026 0 30 if ($pretty)
1036 0 32 if (my $c = $me->{'decoded_callback'})
1048 31 1 unless $name
1080 31 1 unless $th
1083 31 1 unless $th
1103 32 0 if (ref $th) { }
0 0 elsif ($th) { }
1107 0 32 if (my $impl = $th->{'implicit'})
1110 0 0 if (ref $h) { }
1118 2 30 $ty ? :
1125 0 32 unless defined $tn
1138 32 0 unless ($l1 & 128)
1142 0 0 if ($l1 == 128)
1165 32 0 unless ($tag & 31) == 31
1175 0 0 unless $c & 128
1278 0 27 if _have_math_bigint() and length $data > 4
1280 0 27 if ($big) { }
1282 0 0 if ($sgnd and $sign) { }
1291 27 0 $sgnd ? :
1309 0 23 unless $data
1315 0 23 unless defined &POSIX::frexp
1319 0 23 if $first == 64
1320 0 23 if $first == 65
1322 23 0 if ($first & 128) { }
1324 7 16 $first & 64 ? :
1331 0 23 if ($expl == 4)
1342 0 23 if $base == 1
1343 0 23 if $base == 2
1344 0 23 if $base == 3
1380 0 0 if ($o[0] < 40) { }
0 0 elsif ($o[0] < 80) { }
1426 31 56 unless defined &Math::BigInt::new
1427 0 56 unless defined &Math::BigInt::is_neg
1439 0 0 if $tag
1457 0 0 unless $fnc