Branch Coverage

blib/lib/Pod/Text.pm
Criterion Covered Total %
branch 106 140 75.7


line true false branch
69 29 0 if ($self->can('preserve_whitespace')) { }
91 1 28 if ($self->{'opt_stderr'} and not $self->{'opt_errors'})
97 24 5 unless (defined $self->{'opt_errors'})
100 3 26 if ($self->{'opt_errors'} eq 'stderr' or $self->{'opt_errors'} eq 'die') { }
25 1 elsif ($self->{'opt_errors'} eq 'pod') { }
1 0 elsif ($self->{'opt_errors'} eq 'none') { }
103 1 2 if ($self->{'opt_errors'} eq 'die')
117 28 1 unless defined $self->{'opt_alt'}
118 29 0 unless defined $self->{'opt_indent'}
119 28 1 unless defined $self->{'opt_margin'}
120 29 0 unless defined $self->{'opt_loose'}
121 24 5 unless defined $self->{'opt_sentence'}
122 29 0 unless defined $self->{'opt_width'}
126 0 29 if ($self->{'opt_quotes'} eq 'none') { }
28 1 elsif (length $self->{'opt_quotes'} == 1) { }
1 0 elsif (length($self->{'opt_quotes'}) % 2 == 0) { }
139 1 28 if $self->{'opt_code'}
190 994 108 if ($self->can("cmd_$method")) { }
106 2 elsif ($self->can("start_$method")) { }
207 994 108 if ($self->can("cmd_$method")) { }
106 2 elsif ($self->can("end_$method")) { }
211 994 0 if (defined $text)
212 344 650 if (@{$self->{'PENDING'};} > 1) { }
239 40 0 if (s/^([^\n]{0,$width})\s+// or s/^([^\n]{$width})//) { }
258 1 464 if ($self->{'opt_sentence'}) { }
277 1223 20 unless ($self->{'opt_utf8'})
279 5 1218 if ($encoding and $encoding ne $self->{'ENCODING'})
284 0 1243 if ($self->{'ENCODE'}) { }
303 1 39 if ($attrs->{'contentless'} and not $self->{'ALWAYS_EMIT_SOMETHING'}) { }
323 2 38 if ($self->{'opt_utf8'})
328 2 0 if ($flag & 32768)
342 1 39 if ($self->{'complain_die'} and $self->errors_seen)
369 0 136 unless (defined $tag)
378 0 136 unless defined $indent
385 39 97 if (not $text or $text =~ /^\s+$/ or not $fits) { }
389 2 37 if $self->{'opt_alt'} and $indent > 0
396 4 35 if $text and $text =~ /^\s*$/
400 22 17 if $text and $text =~ /\S/
403 2 95 if $self->{'opt_alt'}
405 2 95 if $self->{'opt_alt'} and $indent > 0
407 0 97 unless $text =~ s/^($space)$tagspace/$1$tag/
417 87 307 if (defined $self->{'ITEM'}) { }
429 0 22 if defined $self->{'ITEM'}
430 0 22 if $text =~ /^\s*$/
455 0 79 if defined $self->{'ITEM'}
457 1 78 if ($self->{'opt_alt'}) { }
462 0 78 if $self->{'opt_loose'}
502 0 66 if defined $self->{'ITEM'}
506 0 66 unless (defined $indent and $indent =~ /^\s*[-+]?\d{1,4}\s*$/)
520 4 62 if defined $self->{'ITEM'}
539 13 123 if defined $self->{'ITEM'}
547 16 120 if ($type eq 'bullet') { }
16 104 elsif ($type eq 'number') { }
559 32 104 if ($text)
577 0 10 $_[0]{'alt'} ? :
578 0 6 $_[0]{'alt'} ? :
595 8 105 if $text =~ m[ ^\s* (?: ( [\'\`\"] ) .* \1 # already quoted | \` .* \' # `quoted' | \$+ [\#^]? \S $index # special ($^Foo, $") | [\$\@%&*]+ \#? [:\'\w]+ $index # plain var or func | [\$\@%&*]* [:\'\w]+ (?: -> )? \(\s*[^\s,]\s*\) # 0/1-arg func call | [+-]? ( \d[\d.]* | \.\d+ ) (?: [eE][+-]?\d+ )? # a number | 0x [a-fA-F\d]+ # a hex constant ) \s*\z ]ox
611 0 105 $self->{'opt_alt'} ? :
619 6 104 if ($attrs->{'type'} eq 'url') { }
620 3 3 if (not defined $attrs->{'to'} or $attrs->{'to'} eq $text) { }
1 2 elsif ($self->{'opt_nourls'}) { }
646 0 0 if ($flag eq '-a') { }
0 0 elsif ($flag =~ /^-(\d+)$/) { }
661 0 1 if (defined $_[1]) { }
664 0 0 unless (open IN, $fhs[0])
688 1 33 if (ref $_[0] eq 'HASH')
690 1 0 if (defined $$opts{-'cutting'} and not $$opts{-'cutting'})
725 0 39 unless (defined $self->{'output_fh'})
736 0 126 unless (defined $self->{'output_fh'})
745 0 2 unless (defined $self->{'output_fh'})