Branch Coverage

blib/lib/Pod/MultiLang/Html.pm
Criterion Covered Total %
branch 168 396 42.4


line true false branch
77 0 4 if ($$parser{'_verbose'} >= $level)
92 0 4 unless defined $target
96 0 4 if (exists $$parser{'linkcache'}{$target}) { }
0 4 elsif ($target eq '') { }
0 4 elsif ($target =~ /\(\d+\w?\)$/) { }
127 0 4 $dir ne '' ? :
133 0 0 if -f $found
134 0 0 if $$parser{'_verbose'} >= 90
135 0 0 if (defined $file2)
138 0 0 if -f $found
139 0 0 if $$parser{'_verbose'} >= 90
142 0 0 if -f $found
143 0 0 if $$parser{'_verbose'} >= 90
146 0 4 if ($found) { }
153 0 0 if $$parser{'linkcache'}{$target} = $link_info, $$parser{'_verbose'} >= 90
160 0 4 if (defined $$parser{'opt_missing_poddir'} and $target =~ /^perl\w*$/) { }
0 4 elsif (defined $$parser{'opt_missing_pragmadir'} and $target =~ /^[a-z]/) { }
2 2 elsif (defined $$parser{'opt_missing_dir'}) { }
184 0 4 unless (defined $$link_info{'href'})
192 1 3 if ($sec_anchor)
197 4 0 if (not defined $text or $text eq '')
214 86 1 unless ref $ptree
222 76 11 if ($num_found == 0)
226 11 0 if ($num_found == 1)
231 0 11 if (defined $_ and $$parser{'langs'}[$i] and $$parser{'langs'}[$i] eq 'en')
243 11 11 if (defined $_)
267 0 43 if ref $pkg
268 38 5 @_ && ref $_[0] eq 'HASH' ? :
272 5 38 exists $arg{$_} ? :
277 5 38 if exists $arg{'langs'}
316 1 128 if defined $_ and not m[/$]
341 43 0 unless file_name_is_absolute($outfile)
344 0 43 if ($css and not file_name_is_absolute($css))
358 43 43 if defined $_ and not m[/$]
361 0 43 if ($$parser{'_verbose'} >= 100)
377 0 12 if ($seq_command eq 'I') { }
0 12 elsif ($seq_command eq 'B') { }
0 12 elsif ($seq_command eq 'C') { }
0 12 elsif ($seq_command eq 'L') { }
12 0 elsif ($seq_command eq 'E') { }
0 0 elsif ($seq_command eq 'F') { }
0 0 elsif ($seq_command eq 'S') { }
0 0 elsif ($seq_command eq 'X') { }
0 0 elsif ($seq_command eq 'Z') { }
0 0 elsif ($seq_command eq 'J') { }
407 0 0 if ($$parser{'_expandlangs'})
409 0 0 unless (grep {$lang eq $_;} @{$$parser{'_expandlangs'};})
413 0 0 unless grep {$lang eq $_;} @{$$parser{'_fetchlangs'};}
426 2 2 if ($ptree->isa('Pod::InteriorSequence'))
430 3 1 if ($ptree->isa('Pod::ParseTree'))
435 0 3 ref $_ ? :
439 1 0 if ($ptree->isa('Pod::Paragraph'))
461 0 2 if ($cmd eq 'I' or $cmd eq 'B' or $cmd eq 'C' or $cmd eq 'F' or $cmd eq 'S') { }
0 2 elsif ($cmd eq 'X' or $cmd eq 'Z') { }
0 2 elsif ($cmd eq 'E') { }
0 2 elsif ($cmd eq 'L') { }
2 0 elsif ($cmd eq 'J') { }
477 2 0 if (grep {$_ eq 'en';} @{$$parser{'langs'};}) { }
0 0 elsif ($lang eq $$parser{'langs'}[0]) { }
480 1 1 $lang eq 'en' ? :
502 130 0 if (isa($paraobj, 'Pod::Paragraph')) { }
515 12 134 if (defined $list[$i]) { }
130 4 elsif ($$parser{'langs'}[$i] eq $$parser{'_default_lang'}) { }
522 12 118 if (grep {defined $_;} @list[0 .. $#{$$parser{'langs'};}]) { }
535 0 130 if ($ret eq '')
537 0 0 if (defined $list[-1] and $list[-1] ne '') { }
544 0 0 if defined $_
550 0 0 defined $_ ? :
557 158 32 if ($$this{'langs'}[$i] eq $lang)
574 158 0 if (can($ptree, 'parse_tree'))
578 0 0 isa($ptree, 'ARRAY') ? :
158 0 can($ptree, 'children') ? :
582 160 30 unless (ref $_)
589 4 26 if ($_->cmd_name eq 'L')
597 0 4 if (not $section and $name =~ / /)
602 4 0 unless ($link =~ /J\
605 0 4 if ($type eq 'man') { }
0 4 elsif ($type eq 'url') { }
618 4 0 if (defined $ret[-1]) { }
630 0 0 unless (defined $_)
639 0 0 if (defined $idx_default_lang and not defined $child[$idx_default_lang] and grep {defined $_;} @child[0 .. $#{$$parser{'langs'};}])
657 0 0 unless defined $i
665 0 0 if ($type eq 'man') { }
0 0 elsif ($type eq 'url') { }
677 0 0 if (defined $ret[-1]) { }
687 12 14 if ($_->cmd_name ne 'J')
696 12 0 if ($$parser{'langs'}[$i] eq $$parser{'_default_lang'})
698 0 12 if not defined $child[$i] and grep {defined $_;} @child[0 .. $#{$$parser{'langs'};}]
707 12 12 unless (defined $child[$i])
712 12 0 if (defined $ret[$i]) { }
726 14 0 $first =~ m[^\s*(\w+)\s*[/;]] ? :
731 0 14 unless (defined $lang)
738 0 14 if $$parser{'langs'}[$i] ne $lang
744 0 158 unless $ret[-1] =~ /\S/
759 0 0 if ref $children[$i]
760 0 0 unless my($lang_last, $text_head) = split(m[/], $_, 2)
812 1 0 if (defined $list[$i]) { }
0 0 elsif ($$parser{'langs'}[$i] eq $$parser{'_default_lang'}) { }
822 0 1 unless (defined $plain_title)
824 0 0 defined $list[-1] ? :
832 1 1 if ($$parser{'langs'}[$i] eq $$parser{'_default_lang'}) { }
1 0 elsif (defined $list[$i]) { }
834 1 0 if (not defined $list[$i]) { }
836 1 0 if (grep {defined $_;} @list[0 .. $#{$$parser{'langs'};}]) { }
857 0 1 if ($html eq '')
859 0 0 defined $list[-1] ? :
876 1 1 ref $paraobj ? :
881 0 2 unless $id =~ /^[a-zA-Z]/
895 0 1 if (grep {$_ eq $id;} @$ids)
901 0 0 unless grep {$_ eq $newkey;} @$ids
912 1 2 unless defined $_
917 0 2 if ($_ eq '')
943 0 43 unless (@{$$parser{'paras'};})
960 0 43 if ($$parser{'_verbose'} >= 100)
977 1 0 unless ($paraobj->text =~ /[^\w\s&]/)
997 0 0 if $listtype ne 'dl'
999 0 0 unless ($paraobj->text =~ /[^\w\s&]/)
1022 42 0 unless $$para[0] == 3 and $$para[3] =~ /^NAME/ || $$para[3] =~ /^Xe5X90X8dXe5X89X8d/ || $$para[3] eq 'X'
1035 42 1 unless (defined $plain_title)
1039 42 1 unless (defined $block_title)
1066 0 43 if ($$parser{'_verbose'} >= 100)
1081 0 43 unless defined $plain_title
1083 0 43 unless defined $block_title
1084 20 23 if ($$parser{'_in_charset'} ne $$parser{'_out_charset'})
1088 40 60 unless defined $_
1100 0 43 if (defined $css)
1107 0 43 if (defined $made)
1121 1 42 if (@{$$parser{'heads'};})
1134 1 0 if (not $curlevel) { }
0 0 elsif ($curlevel == $headsize) { }
0 0 elsif ($curlevel < $headsize) { }
1178 0 86 if (grep {$$_[1] eq 'ignore';} @blockstack)
1181 0 0 if ($paratype == 8 and $$_[2] eq $blockstack[-1][0][2])
1194 0 0 if (ref $_ || '') eq 'ARRAY'
1195 0 86 if ($paratype == 1 or $paratype != 8 and $blk and $$blk[1] eq 'verbatim') { }
0 86 elsif (@verbpack) { }
1199 0 0 unless $text =~ /^\n*$/
1205 0 0 unless ($text =~ /^\n*$/)
1218 43 43 if ($paratype == 2) { }
1 42 elsif ($paratype == 3) { }
0 42 elsif ($paratype == 4) { }
0 42 elsif ($paratype == 5) { }
0 42 elsif ($paratype == 6) { }
0 42 elsif ($paratype == 7) { }
0 42 elsif ($paratype == 8) { }
0 42 elsif ($paratype == 9) { }
0 42 elsif ($paratype == 10) { }
42 0 elsif ($paratype == 11) { }
0 0 elsif ($paratype == 12) { }
1222 0 43 if $text =~ /^\s*$/
1227 0 1 if (@blockstack)
1231 0 0 if (ref $_ eq 'ARRAY') { }
1233 0 0 if ($$_[0] == 4)
1236 0 0 if $type eq 'dl'
1242 0 0 if $type eq 'dl'
1252 1 0 if $headsize == 1
1258 0 0 if (defined $type) { }
1276 0 0 if ($in_item)
1278 0 0 $type eq 'dl' ? :
1287 0 0 unless (@blockstack)
1292 0 0 if ($type eq 'ul' or $type eq 'ol') { }
0 0 elsif ($type eq 'dl') { }
1294 0 0 unless $first_item
1304 0 0 unless $first_item
1311 0 0 if $first_item
1318 0 0 if ($mode eq 'html') { }
0 0 elsif ($mode eq 'text') { }
1353 44 42 if (defined $outtext)
1359 0 43 if (@verbpack)
1362 0 0 unless ($text =~ /^\n*$/)
1413 168 0 unless wantarray
1416 0 168 unless defined $_
1417 0 2 $1 eq '>' ? :
0 2 $1 eq '<' ? :
0 2 $1 eq '&' ? :
1422 0 168 @list != 1 ? :
1432 0 0 unless wantarray
1435 0 0 $1 eq 'gt' ? :
0 0 $1 eq 'lt' ? :
0 0 $1 eq 'amp' ? :
1440 0 0 @list != 1 ? :
1450 4 0 unless wantarray
1455 0 4 @list != 1 ? :
1465 12 0 unless wantarray
1468 1 11 if ($_ eq 'lt') { }
1 10 elsif ($_ eq 'gt') { }
1 9 elsif ($_ eq 'verbar') { }
1 8 elsif ($_ eq 'sol') { }
2 6 elsif ($_ =~ /^0x([0-9a-fA-F]+)$/) { }
2 4 elsif ($_ =~ /^0([0-7]+)$/) { }
2 2 elsif ($_ =~ /^\d+$/) { }
1494 0 12 wantarray ? :
1502 0 0 wantarray ? :
1505 0 0 if (/^\w+:[^:]/) { }
1512 0 0 if (/^"(.*)"$/) { }
1517 0 0 s[^([^/\|]*)\|][] ? :
1518 0 0 s[^([^/\|]*)/?][] ? :
1525 0 0 wantarray ? :