Branch Coverage

blib/lib/Text/Layout.pm
Criterion Covered Total %
branch 89 170 52.3


line true false branch
322 1 4 if ($pkg eq "Text::Layout")
324 0 1 unless (@data >= 1 and ref($data[0]) =~ /^PDF::(API2|Builder)\b/)
446 0 0 unless $self->{'_content'}
466 0 0 unless $self->{'_content'}
504 0 20 unless defined $string
522 1 1 if (exists $magstep{$k}) { }
0 1 elsif ($k =~ /^(smaller)$/) { }
0 1 elsif ($k =~ /^(larger)$/) { }
545 30 0 if ($k =~ /^([-\w]+)=(.+)$/) { }
0 0 elsif ($k eq 'strikethrough') { }
0 0 elsif ($k eq 'fallback') { }
549 30 0 unless $k =~ /^(link|href|a)$/
555 1 29 if ($k =~ /^(font|font_desc)$/) { }
1 28 elsif ($k =~ /^(face|font_face|font_family)$/) { }
2 26 elsif ($k =~ /^(size|font_size)$/) { }
8 18 elsif ($k =~ /^(style|font_style)$/) { }
7 11 elsif ($k =~ /^(weight|font_weight)$/) { }
0 11 elsif ($k =~ /^(?:font_)?(variant|stretch)$/) { }
0 11 elsif ($k =~ /^(features|background_alpha|alpha)$/) { }
0 11 elsif ($k =~ /^(foreground|fgcolor|color)$/) { }
0 11 elsif ($k =~ /^(background|bgcolor)$/) { }
2 9 elsif ($k eq 'underline' and $v =~ /^(none|single|double)$/i) { }
1 8 elsif ($k eq 'underline_color') { }
1 7 elsif ($k eq 'overline' and $v =~ /^(none|single|double)$/i) { }
1 6 elsif ($k eq 'overline_color') { }
0 6 elsif ($k eq 'rise') { }
0 6 elsif ($k eq 'baseline_shift') { }
4 2 elsif ($k eq 'strikethrough' and $v =~ /^(true|1)$/i) { }
0 2 elsif ($k eq 'strikethrough' and $v =~ /^(false|0)$/i) { }
2 0 elsif ($k eq 'strikethrough_color') { }
0 0 elsif ($k eq 'fallback') { }
0 0 elsif ($k eq 'lang') { }
0 0 elsif ($k eq 'href') { }
557 1 0 if $fcur->get_size
569 1 1 if (&$try_size($v)) { }
0 1 elsif ($v =~ /^(\d+(?:\.\d+)?)pt$/) { }
1 0 elsif ($v =~ /^\d+(?:\.\d+)?$/) { }
0 0 elsif ($v =~ /^(\d+(?:\.\d+)?)\%$/) { }
574 0 0 $self->{'_pango'} ? :
580 0 1 $self->{'_pango'} ? :
644 0 0 if ($v =~ /^(-?\d+(?:\.\d*)?)pt$/) { }
0 0 elsif (not $self->{'_pango'} and $v =~ /^(-?\d+(?:\.\d*)?)\%$/) { }
652 0 0 $self->{'_pango'} ? :
659 0 0 if ($v =~ /^(-?\d+(?:\.\d*)?)pt$/) { }
0 0 elsif ($v =~ /^(-?\d+(?:\.\d*)?)\%$/) { }
666 0 0 $self->{'_pango'} ? :
717 23 88 if ($a =~ m[^<\s*/\s*(\w+)(.*)>$]) { }
23 65 elsif ($a =~ /^<\s*([-\w]+)(.*)>$/) { }
719 23 0 if (@stack) { }
721 23 0 if ($stack[-1][0] =~ /^<\s*$k\b/) { }
751 4 19 if ($k =~ /^(b|strong)$/) { }
0 19 elsif ($k eq 'big') { }
4 15 elsif ($k =~ /^(i|emp)$/) { }
2 13 elsif ($k eq 's') { }
0 13 elsif ($k eq 'sub') { }
0 13 elsif ($k eq 'sup') { }
1 12 elsif ($k eq 'small') { }
0 12 elsif ($k eq 'tt') { }
1 11 elsif ($k eq 'u') { }
11 0 elsif ($k =~ /^(span)$/) { }
807 59 6 if defined $a and $a ne ""
826 0 20 if (@stack)
882 0 3 unless UNIVERSAL::isa($description, $o)
887 3 0 if (my $sz = $description->{'size'})
890 0 3 if ($sz > 2048)
893 0 3 if ($self->{'_pango'})
957 0 0 unless $self->{'_px2pu'}->($self->{'_width'})
991 0 0 unless $self->{'_px2pu'}->($self->{'_height'})
1131 0 0 unless $self->{'_px2pu'}->($self->{'_currentindent'})
1217 0 0 unless $self->{'_currentlinespacing'}
1288 0 0 if ($align =~ /^(left|right|center)$/i) { }
1457 0 3 if (@bb > 5)
1462 1 2 $need_ink ? :
1494 0 4 if (@bb > 5)
1499 1 3 $need_ink ? :
1523 1 1 wantarray ? :
1541 1 1 wantarray ? :
1685 2 7 $all ? :
7 3 if ($self->{'_bbcache'} and @{$self->{'_bbcache'};} == ($all ? 9 : 5)) { }
1692 10 0 wantarray ? :
1698 3 2 wantarray ? :
1737 0 0 if ($conformant)
1738 0 0 unless $self->{'_pango'}
1744 0 0 if $self->{'_pango'}
1768 0 0 $self->{'_pango'} ? :