Branch Coverage

blib/lib/PDF/TextBlock.pm
Criterion Covered Total %
branch 73 96 76.0


line true false branch
241 0 27 unless (ref $pdf eq 'PDF::API2' or ref $pdf eq 'PDF::Builder')
255 72 34 if $content_texts{$tag}
258 29 5 if ($self->fonts and $self->fonts->{$tag}) { }
0 5 elsif ($self->fonts and $self->fonts->{'default'}) { }
259 0 29 if $debug
262 0 0 if $debug
265 0 5 if $debug
278 1 26 if ($self->align eq 'text_right')
301 2 1266 if exists $width{$word}
302 83 1183 if (($tag) = $word =~ /<(.*?)>/)
303 78 5 unless ($tag =~ m[/])
304 0 78 unless ($content_texts{$tag})
316 4 1262 if ($tag and $tag =~ m[^/])
333 29 155 unless (@paragraph)
334 24 5 unless scalar @paragraphs
338 0 5 if $self->parspace
339 0 5 unless $ypos >= $self->y - $self->h
351 0 160 if ($first_line and defined $self->hang) { }
0 160 elsif ($first_line and defined $self->flindent) { }
0 160 elsif ($first_paragraph and defined $self->fpindent) { }
0 160 elsif (defined $self->indent) { }
359 0 0 if $first_paragraph
385 122 38 if ($self->align eq 'fulljustify' or $self->align eq 'justify' and @paragraph) { }
388 0 122 if (scalar @line == 1)
395 14 24 $self->align eq 'justify' ? :
402 132 28 if ($align eq 'justify' or grep /<.*>/, @line) { }
405 3 129 if ($align eq 'center') { }
3 126 elsif ($align eq 'right') { }
414 83 1002 if (($tag) = $word =~ /<(.*?)>/)
416 1 82 if ($tag =~ /^href[a-z]?/) { }
78 4 elsif (not $tag =~ m[/]) { }
418 1 0 if ref $content_texts{$tag}
426 0 1085 if $debug
429 6 1079 if ($href) { }
439 1 5 if ($word =~ m[
454 0 1085 unless ($width{$word})
455 0 0 if $debug
458 1085 0 if @line
460 80 1005 if ($word =~ m[/])
461 1 79 if ($word =~ m[/href[a-z]?])
464 79 1 unless ($href)
472 4 24 if ($align eq 'right') { }
6 18 elsif ($align eq 'center') { }
478 0 28 if $debug
489 2 24 if scalar @paragraph
543 34 182 unless defined $self->$att
547 4 23 unless (defined $self->page)
552 2 25 unless (defined $self->text)