Branch Coverage

blib/lib/PostScript/MailLabels.pm
Criterion Covered Total %
branch 56 160 35.0


line true false branch
177 0 0 unless (defined $name)
179 0 0 unless (defined $type)
181 0 0 unless (defined $font)
182 0 0 unless (defined $adj)
184 0 0 if (not defined $index and defined $$self{'COMPONENTS'}{$name}) { }
0 0 elsif (not defined $index) { }
0 0 elsif (not $index =~ /^\d+$/) { }
192 0 0 if ($type ne 'name' and $type ne 'road' and $type ne 'place' and $type ne 'bar')
196 0 0 if ($adj ne 'yes' and $adj ne 'no')
203 0 0 if ($font eq $_)
208 0 0 unless ($okay)
235 0 0 unless (defined $line)
237 0 0 if ($line eq 'clear')
242 0 0 if ($#_ < 0)
244 0 0 unless ($line =~ /^\d+$/)
254 0 0 if ($_ eq 'postnet')
255 0 0 unless (defined $$self{'COMPONENTS'}{$_})
264 0 0 if ($postnet and $#comps > 0)
283 0 0 if (/^X$/i) { }
0 0 elsif (/^Y$/i) { }
0 0 elsif (/^text$/i) { }
320 0 6 if (defined $args{'units'} and $args{'units'} eq 'metric')
325 0 20 unless (defined $params{lc $_})
329 2 18 if (lc $_ eq 'font') { }
0 18 elsif (lc $_ eq 'encoding') { }
1 17 elsif (lc $_ eq 'papersize') { }
0 17 elsif (lc $_ eq 'width') { }
0 17 elsif (lc $_ eq 'height') { }
0 17 elsif (lc $_ eq 'orientation') { }
333 2 81 if ($font eq $args{$_})
338 0 2 unless ($okay)
349 0 0 if ($encoding =~ /$args{$_}/i)
355 0 0 unless ($okay)
366 1 0 if ($paper =~ /$args{$_}/i)
372 0 1 unless ($okay)
392 0 0 if ($val ne 'portrait' and $val ne 'landscape')
406 12 60 if (defined $args{$_})
418 6 6 if defined $$self{'SETUP'}{$_}
420 6 0 if ($labelmaker)
439 0 6 if ($$self{'SETUP'}{'columns'} > 0)
443 0 0 if (abs $pwidth - papersize($self, 1)->[0] > $$self{'SETUP'}{'output_width'} / 2)
488 0 1 $landscape ? :
491 1 0 if ($$self{'SETUP'}{'units'} eq 'metric')
526 0 1 $landscape ? :
580 0 1 $landscape ? :
587 1 0 if ($$self{'SETUP'}{'postnet'} eq 'yes')
615 1 0 if ($rows * $boxheight + $by > $paperheight - $bbor)
633 9 18 if ($x < $lbor) { }
636 9 18 if ($x > $rbor) { }
696 0 28 if length join('', @text) == 0
703 7 42 if ($$self{'COMPONENTS'}{$comp}{'type'} eq 'bar') { }
722 0 7 if ($lab > $rows * $cols)
725 0 0 if ($$self{'FREETEXT'}{'Text'} ne '')
735 0 1 if ($$self{'FREETEXT'}{'Text'} ne '')
740 1 0 unless $lab == 1
757 7 21 if ($$self{'COMPONENTS'}{$$line[0]}{'type'} eq 'bar')
767 0 21 if ($$self{'SETUP'}{'encoding'} ne 'StandardEncoding')
782 0 42 unless (defined $$addrs[$$self{'COMPONENTS'}{$comp}{'index'}])
789 28 14 if ($$self{'COMPONENTS'}{$comp}{'adj'} eq 'yes')
790 22 6 if ($maxlen < $length)
801 21 0 if ($maxlen == 0 or $totlen <= $width)
807 0 0 if ($type eq 'name') { }
0 0 elsif ($type eq 'road') { }
0 0 elsif ($type eq 'place') { }
851 0 0 if ($strwidth > $width)
854 0 0 if ($name =~ / and /)
858 0 0 if ($nchar > 0)
863 0 0 if ($strwidth > $width)
878 0 0 if ($strwidth > $width)
885 0 0 if ($strwidth > $width)
903 0 0 if ($strwidth > $width)
915 0 7 if (not defined $zip or length $zip < 5)
925 0 7 if ($zip =~ /[^0-9]/)
939 0 7 if ($strwidth > $width)
945 6 1 if (length $zip == 5)
951 0 1 if (length $zip != 9)
962 1 0 if ($strwidth > $width)
997 1 44 if (grep /$product/, @{$$self{'DATA'}{'AVERY'}{$_}[1];})
1029 0 0 if (grep /$product/, @{$$self{'DATA'}{'DYMO'}{$_}[1];})
1059 14 0 if (not $logical or $$self{'SETUP'}{'orientation'} eq 'portrait') { }