Branch Coverage

blib/lib/Pod/Man.pm
Criterion Covered Total %
branch 199 250 79.6


line true false branch
52 11 0 defined &Pod::Simple::DEBUG ? :
53 11 0 unless (defined &Pod::Man::DEBUG)
104 30 0 if (my $preserve_whitespace = $self->can('preserve_whitespace')) { }
124 1 29 if ($self->{'stderr'} and not $self->{'errors'})
130 23 7 unless (defined $self->{'errors'})
133 3 27 if ($self->{'errors'} eq 'stderr' or $self->{'errors'} eq 'die') { }
25 2 elsif ($self->{'errors'} eq 'pod') { }
2 0 elsif ($self->{'errors'} eq 'none') { }
136 1 2 if ($self->{'errors'} eq 'die')
157 1 29 if ($self->{'utf8'} and not $HAS_ENCODE)
158 1 0 unless ($ENV{'PERL_CORE'})
182 120 0 length $_[0] > 1 ? :
195 0 4 if (defined $font and length $font < 1 || length $font > 2)
227 0 30 if ($self->{'quotes'} eq 'none') { }
29 1 elsif (length $self->{'quotes'} == 1) { }
1 0 elsif (length($self->{'quotes'}) % 2 == 0) { }
240 2 28 if (defined $self->{'lquote'})
241 0 2 $self->{'lquote'} eq 'none' ? :
243 2 28 if (defined $self->{'rquote'})
244 1 1 $self->{'rquote'} eq 'none' ? :
271 28 2 unless defined $self->{'center'}
273 26 4 unless defined $self->{'release'}
275 30 0 unless defined $self->{'indent'}
279 58 2 if $self->{$_}
331 612 109 if ($self->can("cmd_$method")) { }
105 4 elsif (my $start_method = $self->can("start_$method")) { }
333 177 435 if $element ne 'Para' and length $element > 1
340 421 191 unless $self->{'PENDING'}[-1][1]
341 517 95 unless $FORMATTING{$element}
362 612 109 if (my $cmd_method = $self->can("cmd_$method")) { }
105 4 elsif (my $end_method = $self->can("end_$method")) { }
368 578 34 if (defined $text)
369 191 387 if (@{$self->{'PENDING'};} > 1) { }
400 669 9 if ($cleanup)
408 662 12 if ($convert and not $self->{'utf8'} and 1)
409 1 64 unless $Pod::Man::ESCAPES{ord $1}
414 110 568 if ($literal)
422 540 138 if ($guesswork)
443 2 71 if $self->{'IN_NAME'}
447 6 65 if m[ ^\s* (?: ( [\'\`\"] ) .* \1 # already quoted | \\\*\(Aq .* \\\*\(Aq # quoted and escaped | \\?\` .* ( \' | \\\*\(Aq ) # `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 ]osx
505 540 0 if ($self->{'MAGIC_EMDASH'})
524 540 0 if ($self->{'MAGIC_SMALLCAPS'})
542 540 0 if ($self->{'MAGIC_FUNC'})
558 540 0 if ($self->{'MAGIC_MANREF'})
572 540 0 if ($self->{'MAGIC_VARS'})
589 540 0 if ($self->{'MAGIC_CPP'})
629 14 14 if ($last ne '\\fR')
630 14 14 $2 eq 'S' ? :
632 0 28 if ($f eq $last) { }
635 14 14 if ($f ne '\\fR')
655 118 118 $2 eq 'S' ? :
681 20 132 if ($text =~ /\"/ or $text =~ /$fixedpat/) { }
686 13 7 if ($c_is_quote and $text =~ /\\\*\(C[\'\`]/)
691 9 11 $extra ? :
692 9 11 $extra ? :
706 16 4 if ($nroff ne $troff) { }
712 65 67 $extra ? :
735 4 281 if $self->{'ITEMS'} > 1
738 10 145 $self->{'INDENT'} > 0 ? :
155 130 if $self->{'NEEDSPACE'}
747 273 118 unless $section or @entries
755 5 113 if (@entries)
758 113 5 if ($section)
777 18 1195 if ($self->{'ENCODE'}) { }
792 1 62 if ($attrs->{'contentless'} and not $self->{'ALWAYS_EMIT_SOMETHING'}) { }
804 4 59 if ($self->{'utf8'})
809 2 2 if ($flag & 32768)
817 62 1 unless ($self->{'CONTENTLESS'})
819 20 42 if (defined $self->{'name'}) { }
825 4 58 defined $self->{'date'} ? :
826 62 0 unless $self->bare_output or !1
847 1 62 if ($self->{'complain_die'} and $self->errors_seen)
850 0 62 if $self->bare_output
851 1 61 if $self->{'CONTENTLESS'} and not $self->{'ALWAYS_EMIT_SOMETHING'}
862 1 43 if not $self->{'section'} and $name =~ /\.pm\z/i
873 2 42 if ($name =~ /^IO::File(?:=\w+)\(0x[\da-f]+\)$/i)
876 5 39 if ($name eq '')
882 43 1 if (not $section =~ /^3/) { }
905 0 1 if (@dirs)
909 0 0 if ($dirs[$i] =~ /perl/)
911 0 0 if $dirs[$i + 1] and $dirs[$i + 1] eq 'lib'
915 0 0 if ($cut > 0)
917 0 0 if $dirs[0] =~ /^(site|vendor)(_perl)?$/
918 0 0 if $dirs[0] =~ /^[\d.]+$/
919 0 0 if $dirs[0] =~ /^(.*-$^O|$^O-.*|$^O)$/
921 0 0 if $dirs[0] eq 'lib'
922 0 0 if $dirs[0] eq 'blib' and $dirs[1] eq 'lib'
927 0 0 $_ ? :
955 3 61 if (defined $ENV{'POD_MAN_DATE'})
961 1 60 if (defined $ENV{'SOURCE_DATE_EPOCH'} and not $ENV{'SOURCE_DATE_EPOCH'} =~ /\D/)
967 60 1 unless (defined $time)
969 43 17 if ($input) { }
1003 0 124 if (/\s/)
1056 4 240 if ($self->{'SHIFTWAIT'})
1065 0 244 if defined $line and 0 and not $self->{'IN_NAME'}
1089 0 13 unless $text =~ /\S/
1105 4 57 if /^\s*$/
1108 0 13 if $unbroken > 12 and not $self->{'MAGIC_VNOPAGEBREAK_LIMIT'}
1144 0 86 if ($self->{'ITEMS'} > 1)
1150 0 86 if defined $line and 0
1165 60 13 unless $isname
1211 1 16 $_[0]{'IN_NAME'} ? :
1212 1 30 $_[0]{'IN_NAME'} ? :
1213 1 6 $_[0]{'IN_NAME'} ? :
1229 4 54 if ($attrs->{'type'} eq 'url') { }
1231 4 0 if (defined $to)
1235 1 3 if (not defined $to or $to eq $text) { }
1 2 elsif ($self->{'nourls'}) { }
1262 0 42 unless (defined $indent and $indent =~ /^[-+]?\d{1,4}\s*$/)
1270 7 35 if (@{$self->{'SHIFTS'};} < @{$self->{'INDENTS'};})
1297 9 33 if (@{$self->{'SHIFTS'};} > @{$self->{'INDENTS'};})
1304 9 33 if (@{$self->{'INDENTS'};} > 0)
1338 12 62 if ($type eq 'bullet') { }
8 54 elsif ($type eq 'number') { }
1347 40 14 if $item =~ /\w/
1356 2 72 if (@{$self->{'SHIFTS'};} == @{$self->{'INDENTS'};})
1360 6 68 if $self->{'ITEMS'} == 1
1370 20 54 if ($text)
1376 40 34 $index ? :
1397 1 40 if (ref $_[0] eq 'HASH')
1399 1 0 if (defined $$opts{-'cutting'} and not $$opts{-'cutting'})
1434 0 43 unless (defined $self->{'output_fh'})
1445 0 197 unless (defined $self->{'output_fh'})
1454 0 21 unless (defined $self->{'output_fh'})
1569 58 4 if ($accents)