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 61 0 if (my $preserve_whitespace = $self->can('preserve_whitespace')) { }
124 1 60 if ($self->{'stderr'} and not $self->{'errors'})
130 54 7 unless (defined $self->{'errors'})
133 3 58 if ($self->{'errors'} eq 'stderr' or $self->{'errors'} eq 'die') { }
56 2 elsif ($self->{'errors'} eq 'pod') { }
2 0 elsif ($self->{'errors'} eq 'none') { }
136 1 2 if ($self->{'errors'} eq 'die')
157 1 60 if ($self->{'utf8'} and not $HAS_ENCODE)
158 1 0 unless ($ENV{'PERL_CORE'})
182 244 0 length $_[0] > 1 ? :
195 0 4 if (defined $font and length $font < 1 || length $font > 2)
227 0 61 if ($self->{'quotes'} eq 'none') { }
60 1 elsif (length $self->{'quotes'} == 1) { }
1 0 elsif (length($self->{'quotes'}) % 2 == 0) { }
240 2 59 if (defined $self->{'lquote'})
241 0 2 $self->{'lquote'} eq 'none' ? :
243 2 59 if (defined $self->{'rquote'})
244 1 1 $self->{'rquote'} eq 'none' ? :
271 59 2 unless defined $self->{'center'}
273 57 4 unless defined $self->{'release'}
275 61 0 unless defined $self->{'indent'}
279 120 2 if $self->{$_}
331 606 106 if ($self->can("cmd_$method")) { }
102 4 elsif (my $start_method = $self->can("start_$method")) { }
333 174 432 if $element ne 'Para' and length $element > 1
340 416 190 unless $self->{'PENDING'}[-1][1]
341 512 94 unless $FORMATTING{$element}
362 606 106 if (my $cmd_method = $self->can("cmd_$method")) { }
102 4 elsif (my $end_method = $self->can("end_$method")) { }
368 572 34 if (defined $text)
369 190 382 if (@{$self->{'PENDING'};} > 1) { }
400 662 9 if ($cleanup)
408 655 12 if ($convert and not $self->{'utf8'} and 1)
409 1 64 unless $Pod::Man::ESCAPES{ord $1}
414 109 562 if ($literal)
422 536 135 if ($guesswork)
443 1 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 536 0 if ($self->{'MAGIC_EMDASH'})
524 536 0 if ($self->{'MAGIC_SMALLCAPS'})
542 536 0 if ($self->{'MAGIC_FUNC'})
558 536 0 if ($self->{'MAGIC_MANREF'})
572 536 0 if ($self->{'MAGIC_VARS'})
589 536 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 129 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 64 $extra ? :
735 4 279 if $self->{'ITEMS'} > 1
738 10 144 $self->{'INDENT'} > 0 ? :
154 129 if $self->{'NEEDSPACE'}
747 271 116 unless $section or @entries
755 5 111 if (@entries)
758 111 5 if ($section)
777 18 1179 if ($self->{'ENCODE'}) { }
792 1 59 if ($attrs->{'contentless'} and not $self->{'ALWAYS_EMIT_SOMETHING'}) { }
804 4 56 if ($self->{'utf8'})
809 2 2 if ($flag & 32768)
817 59 1 unless ($self->{'CONTENTLESS'})
819 52 7 if (defined $self->{'name'}) { }
825 4 55 defined $self->{'date'} ? :
826 59 0 unless $self->bare_output or !1
847 1 59 if ($self->{'complain_die'} and $self->errors_seen)
850 0 59 if $self->bare_output
851 1 58 if $self->{'CONTENTLESS'} and not $self->{'ALWAYS_EMIT_SOMETHING'}
862 1 8 if not $self->{'section'} and $name =~ /\.pm\z/i
873 2 7 if ($name =~ /^IO::File(?:=\w+)\(0x[\da-f]+\)$/i)
876 5 4 if ($name eq '')
882 8 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 58 if (defined $ENV{'POD_MAN_DATE'})
961 1 57 if (defined $ENV{'SOURCE_DATE_EPOCH'} and not $ENV{'SOURCE_DATE_EPOCH'} =~ /\D/)
967 57 1 unless (defined $time)
969 8 49 if ($input) { }
1003 0 118 if (/\s/)
1056 4 238 if ($self->{'SHIFTWAIT'})
1065 0 242 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 83 if ($self->{'ITEMS'} > 1)
1150 0 83 if defined $line and 0
1165 58 12 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 5 if (ref $_[0] eq 'HASH')
1399 1 0 if (defined $$opts{-'cutting'} and not $$opts{-'cutting'})
1434 0 8 unless (defined $self->{'output_fh'})
1445 0 411 unless (defined $self->{'output_fh'})
1454 0 53 unless (defined $self->{'output_fh'})
1569 55 4 if ($accents)