Branch Coverage

blib/lib/Barcode/DataMatrix/Engine.pm
Criterion Covered Total %
branch 129 254 50.7


line true false branch
119 12 30 if stringToType($_) == $i and defined $i
134 12 0 unless $sz
138 0 0 if $FORMATS[$i][0] == $w and $FORMATS[$i][1] == $h
140 0 0 unless defined $r
154 0 12 if $DEBUG{'ENC'}
156 0 12 unless defined $t
158 0 12 if $DEBUG{'ENC'}
171 0 12 if $DEBUG{'TRACE'}
176 0 12 if shift()
177 0 12 unless my $l = length $self->{'code'}
229 0 0 if ($d < 127) { }
0 0 elsif ($d < 16383) { }
244 0 0 if $DEBUG{'TRACE'}
247 0 0 $1 eq '~' ? :
248 0 0 if $DEBUG{'TRACE'}
318 75 74 $l <= 254 ? :
331 0 12 if $DEBUG{'TRACE'}
334 10 2 if $self->{'encoding'} != E_AUTO()
337 0 12 if $DEBUG{'ENC'}
338 2 10 if ($_ == E_AUTO())
339 2 8 if ($_ == E_ASCII())
340 2 6 if ($_ == E_C40())
341 2 4 if ($_ == E_TEXT())
342 2 2 if ($_ == E_BASE256())
343 2 0 if ($_ == E_NONE())
345 0 12 if $DEBUG{'TRACE'}
348 0 12 if $DEBUG{'ENC'}
350 0 12 if ($self->{'preferredFormat'} != -1)
352 0 0 if $i > $FORMATS[$k][7]
357 48 46 if $self->{'currentEncoding'} != E_C40() and $self->{'currentEncoding'} != E_TEXT()
359 0 0 if ($self->{'C49rest'} == 1 and $$ai1[$i - 2] == 254 and $FORMATS[$k][7] == $i - 1)
365 44 2 if $self->{'C49rest'} != 0 or $$ai1[$i - 1] != 254 or $FORMATS[$k][7] != $i - 1
371 0 12 if $k == 30
392 0 6 if $self->{'currentEncoding'} == E_C40() || $self->{'currentEncoding'} == E_TEXT() and ($self->{'C49rest'} == 0 and $i == $self->{'totaldata'} and $$ai1[$i - 1] == 254)
395 0 12 if $DEBUG{'CALC'}
398 9 149 $flag ? :
417 0 12 if $DEBUG{'CALC'}
422 782 446 if $block > $blocks
425 0 12 if $DEBUG{'CALC'}
428 0 16 if ($self->{'rows'} == 144 and $_ > 7)
436 0 12 if $DEBUG{'CALC'}
441 1758 0 if ($n < @{$blocks[$b];}) { }
458 0 0 (shift()) =~ /^[0-9]$/ ? :
469 0 494 $i >= 48 && $i <= 57 ? :
480 0 308 $i >= 97 && $i <= 122 ? :
491 308 0 $i >= 65 && $i <= 90 ? :
503 0 2 if $DEBUG{'TRACE'}
518 0 2 if $DEBUG{'EAUTO'}
520 0 2 if $DEBUG{'EAUTO'}
522 0 2 if $DEBUG{'EAUTO'}
524 0 2 if ($iterator + 1 < $i and isIDigit($ai->[$iterator]) and isIDigit($$ai[$iterator + 1]))
529 0 0 if $DEBUG{'EAUTO'}
530 0 0 if $l2 != E_ASCII()
541 2 0 unless ($flag1)
542 0 2 if $DEBUG{'EAUTO'}
545 2 0 if ($l1 != E_ASCII())
546 0 2 if $DEBUG{'EAUTO'}
551 0 2 if (not $flag1 and $self->{'currentEncoding'} == E_ASCII())
552 0 0 if $l2 != E_ASCII()
563 0 2 if $DEBUG{'EAUTO'}
575 0 2 if $DEBUG{'EAUTO'}
587 0 2 if $DEBUG{'EAUTO'}
589 0 2 if ($self->{'currentEncoding'} == E_BASE256())
597 0 2 if $DEBUG{'EAUTO'}
610 0 2 if $DEBUG{'TRACE'}
612 0 2 if $DEBUG{'ENC'}
617 0 184 if ($k < $i - 1 and isIDigit($ai->[$k]) and isIDigit($$ai[$k + 1]))
628 0 186 if (not $flag1 and defined $as->[$k])
630 0 0 if ($ai->[$k] == 234 or $ai->[$k] == 237 or $ai->[$k] == 236 or $ai->[$k] == 232)
640 0 0 if ($ai->[$k] == 233 or $ai->[$k] == 241)
649 186 0 unless ($flag1)
650 186 0 if ($ai->[$k] < 128) { }
661 0 2 if $DEBUG{'ENC'}
677 0 64 if $DEBUG{'TRACE'}
682 64 0 unless defined $ai
685 0 64 unless defined $i
693 62 2 if ($i != E_ASCII())
700 62 2 if $i == E_C40()
701 0 64 if $i == E_TEXT()
702 0 64 if $i == E_BASE256()
705 0 0 if defined $as->[$j] and $DEBUG{'EAUTO'}
707 0 308 if defined $as->[$j]
709 0 308 if (isIDigit($c)) { }
0 308 elsif ($c > 127) { }
713 308 0 if (@{$C1[$c];} == 1) { }
0 0 elsif ($c > 127) { }
717 308 0 if (isIUpper($c))
718 0 308 if (isILower($c))
720 0 308 if (@{$C1[$c1];} == 1) { }
0 308 elsif ($c1 > 127) { }
726 62 246 if ($j - $k >= 4)
728 0 0 if $d + 1 <= $d2 and $d + 1 <= $d3 and $d + 1 <= $d4
729 0 62 if $d4 + 1 <= $d
730 0 62 if $d4 + 1 < $d3 and $d4 + 1 < $d2
731 0 0 if $d3 + 1 < $d and $d3 + 1 < $d2 and $d3 + 1 < $d4
732 60 0 if $d2 + 1 < $d and $d2 + 1 < $d3 and $d2 + 1 < $d4
740 0 0 if $d <= $d2 and $d <= $d3 and $d <= $d4
741 0 0 if $d3 < $d and $d3 < $d2 and $d3 < $d4
742 0 0 if $d4 < $d and $d4 < $d3 and $d4 < $d2
760 6 60 if ($flag1)
761 2 4 $flag ? :
765 186 372 if ($flag)
767 0 186 if $l >= 97 and $l <= 122
768 186 0 if $l >= 65 and $l <= 90
774 248 496 if ($k == 3)
782 62 496 if ($flag2 and $k == 0)
785 2 60 if $ai->[0] == $i
791 0 4 if ($k > 0) { }
792 0 0 if ($k == 1)
797 0 0 if ($k == 2)
870 0 2 if $DEBUG{'B256'}
871 0 2 if $DEBUG{'B256'}
874 0 186 if $flag and $self->SelectEncoding($j1 + 1, $src, E_BASE256()) != E_BASE256()
876 0 2 if $DEBUG{'B256'}
877 0 2 if $DEBUG{'B256'}
881 2 0 if ($j < 250) { }
901 0 12 if $DEBUG{'TRACE'}
906 0 12 if ($self->{'regions'} == 2) { }
922 0 12 if $DEBUG{'CALC'}
924 0 12 if $DEBUG{'CALC'}
925 0 12 if $DEBUG{'CALC'}
926 0 12 if $DEBUG{'CALC'}
935 14064 12 if ($$ai2[$i2 * $self->{'mapcols'} + $k2] > 9) { }
943 742 13334 if ($k2 > 0 and ($k2 + 1) % $self->{'datacols'} == 0)
948 20 330 if ($i2 > 0 and ($i2 + 1) % $self->{'datarows'} == 0)
966 413 413 $k1 % 2 == 0 ? :
972 413 413 ($l1 + 1) % 2 == 0 ? :