Branch Coverage

blib/lib/Barcode/DataMatrix/Engine.pm
Criterion Covered Total %
branch 129 252 51.1


line true false branch
117 12 30 if stringToType($_) == $i and defined $i
132 12 0 unless $sz
136 0 0 if $FORMATS[$i][0] == $w and $FORMATS[$i][1] == $h
138 0 0 unless defined $r
152 0 12 if $DEBUG{'ENC'}
153 0 12 unless defined $t
155 0 12 if $DEBUG{'ENC'}
168 0 12 if $DEBUG{'TRACE'}
173 0 12 if shift()
174 0 12 unless my $l = length $self->{'code'}
226 0 0 if ($d < 127) { }
0 0 elsif ($d < 16383) { }
241 0 0 if $DEBUG{'TRACE'}
244 0 0 $1 eq '~' ? :
245 0 0 if $DEBUG{'TRACE'}
291 75 74 $l <= 254 ? :
304 0 12 if $DEBUG{'TRACE'}
307 10 2 if $self->{'encoding'} != E_AUTO()
309 0 12 if $DEBUG{'ENC'}
310 2 10 if ($_ == E_AUTO())
311 2 8 if ($_ == E_ASCII())
312 2 6 if ($_ == E_C40())
313 2 4 if ($_ == E_TEXT())
314 2 2 if ($_ == E_BASE256())
315 2 0 if ($_ == E_NONE())
317 0 12 if $DEBUG{'TRACE'}
319 0 12 if $DEBUG{'ENC'}
321 0 12 if ($self->{'preferredFormat'} != -1)
323 0 0 if $i > $FORMATS[$k][7]
327 48 46 if $self->{'currentEncoding'} != E_C40() and $self->{'currentEncoding'} != E_TEXT()
328 0 0 if ($self->{'C49rest'} == 1 and $$ai1[$i - 2] == 254 and $FORMATS[$k][7] == $i - 1)
334 44 2 if $self->{'C49rest'} != 0 or $$ai1[$i - 1] != 254 or $FORMATS[$k][7] != $i - 1
340 0 12 if $k == 30
360 0 6 if $self->{'currentEncoding'} == E_C40() || $self->{'currentEncoding'} == E_TEXT() and ($self->{'C49rest'} == 0 and $i == $self->{'totaldata'} and $$ai1[$i - 1] == 254)
363 0 12 if $DEBUG{'CALC'}
365 9 149 $flag ? :
384 0 12 if $DEBUG{'CALC'}
389 782 446 if $block > $blocks
391 0 12 if $DEBUG{'CALC'}
394 0 16 if ($self->{'rows'} == 144 and $_ > 7)
401 0 12 if $DEBUG{'CALC'}
405 1758 0 if ($n < @{$blocks[$b];})
421 0 494 $i >= 48 && $i <= 57 ? :
432 0 308 $i >= 97 && $i <= 122 ? :
443 308 0 $i >= 65 && $i <= 90 ? :
455 0 2 if $DEBUG{'TRACE'}
470 0 2 if $DEBUG{'EAUTO'}
472 0 2 if $DEBUG{'EAUTO'}
474 0 2 if $DEBUG{'EAUTO'}
476 0 2 if ($iterator + 1 < $i and isIDigit($ai->[$iterator]) and isIDigit($$ai[$iterator + 1]))
481 0 0 if $DEBUG{'EAUTO'}
482 0 0 if $l2 != E_ASCII()
493 2 0 unless ($flag1)
494 0 2 if $DEBUG{'EAUTO'}
496 2 0 if ($l1 != E_ASCII())
497 0 2 if $DEBUG{'EAUTO'}
502 0 2 if (not $flag1 and $self->{'currentEncoding'} == E_ASCII())
503 0 0 if $l2 != E_ASCII()
514 0 2 if $DEBUG{'EAUTO'}
525 0 2 if $DEBUG{'EAUTO'}
537 0 2 if $DEBUG{'EAUTO'}
539 0 2 if ($self->{'currentEncoding'} == E_BASE256())
547 0 2 if $DEBUG{'EAUTO'}
560 0 2 if $DEBUG{'TRACE'}
562 0 2 if $DEBUG{'ENC'}
567 0 184 if ($k < $i - 1 and isIDigit($ai->[$k]) and isIDigit($$ai[$k + 1]))
577 0 186 if (not $flag1 and defined $as->[$k])
578 0 0 if ($ai->[$k] == 234 or $ai->[$k] == 237 or $ai->[$k] == 236 or $ai->[$k] == 232)
587 0 0 if ($ai->[$k] == 233 or $ai->[$k] == 241)
595 186 0 unless ($flag1)
596 186 0 if ($ai->[$k] < 128) { }
604 0 2 if $DEBUG{'ENC'}
620 0 64 if $DEBUG{'TRACE'}
625 64 0 unless defined $ai
628 0 64 unless defined $i
636 62 2 if ($i != E_ASCII())
643 62 2 if $i == E_C40()
644 0 64 if $i == E_TEXT()
645 0 64 if $i == E_BASE256()
648 0 0 if defined $as->[$j] and $DEBUG{'EAUTO'}
650 0 308 if defined $as->[$j]
652 0 308 if (isIDigit($c)) { }
0 308 elsif ($c > 127) { }
656 308 0 if (@{$C1[$c];} == 1) { }
0 0 elsif ($c > 127) { }
660 308 0 if (isIUpper($c))
661 0 308 if (isILower($c))
663 0 308 if (@{$C1[$c1];} == 1) { }
0 308 elsif ($c1 > 127) { }
669 62 246 if ($j - $k >= 4)
670 0 0 if $d + 1 <= $d2 and $d + 1 <= $d3 and $d + 1 <= $d4
671 0 62 if $d4 + 1 <= $d
672 0 62 if $d4 + 1 < $d3 and $d4 + 1 < $d2
673 0 0 if $d3 + 1 < $d and $d3 + 1 < $d2 and $d3 + 1 < $d4
674 60 0 if $d2 + 1 < $d and $d2 + 1 < $d3 and $d2 + 1 < $d4
682 0 0 if $d <= $d2 and $d <= $d3 and $d <= $d4
683 0 0 if $d3 < $d and $d3 < $d2 and $d3 < $d4
684 0 0 if $d4 < $d and $d4 < $d3 and $d4 < $d2
701 6 60 if ($flag1)
702 2 4 $flag ? :
706 186 372 if ($flag)
708 0 186 if $l >= 97 and $l <= 122
709 186 0 if $l >= 65 and $l <= 90
715 248 496 if ($k == 3)
723 62 496 if ($flag2 and $k == 0)
726 2 60 if $ai->[0] == $i
732 0 4 if ($k > 0) { }
733 0 0 if ($k == 1)
738 0 0 if ($k == 2)
800 0 2 if $DEBUG{'B256'}
801 0 2 if $DEBUG{'B256'}
804 0 186 if $flag and $self->SelectEncoding($j1 + 1, $src, E_BASE256()) != E_BASE256()
806 0 2 if $DEBUG{'B256'}
807 0 2 if $DEBUG{'B256'}
810 2 0 if ($j < 250) { }
830 0 12 if $DEBUG{'TRACE'}
835 0 12 if ($self->{'regions'} == 2) { }
851 0 12 if $DEBUG{'CALC'}
853 0 12 if $DEBUG{'CALC'}
854 0 12 if $DEBUG{'CALC'}
855 0 12 if $DEBUG{'CALC'}
864 14064 12 if ($$ai2[$i2 * $self->{'mapcols'} + $k2] > 9) { }
872 742 13334 if ($k2 > 0 and ($k2 + 1) % $self->{'datacols'} == 0)
877 20 330 if ($i2 > 0 and ($i2 + 1) % $self->{'datarows'} == 0)
894 413 413 $k1 % 2 == 0 ? :
900 413 413 ($l1 + 1) % 2 == 0 ? :