Branch Coverage

lib/Pod/Xhtml.pm
Criterion Covered Total %
branch 170 216 78.7


line true false branch
58 7 0 unless defined $$self{'TopLinks'}
59 6 1 unless defined $$self{'MakeIndex'}
60 7 0 unless defined $$self{'MakeMeta'}
61 7 0 unless defined $$self{'FragmentOnly'}
66 0 7 if $$self{'TopHeading'} < 1
95 122 99 if ($$para{'-prefix'} eq '=') { }
8 91 elsif (not @{$$para{'-ptree'};}) { }
104 248 60 unless (ref $_)
113 7 0 if $$self{'MakeIndex'}
120 0 7 if $$self{'buffer'} =~ /#<<
127 7 0 if $$self{'MakeMeta'}
129 7 0 unless ($$self{'FragmentOnly'})
136 6 1 unless ($$self{'StringMode'})
175 2 246 $p2x_region ? :
60 248 ref $_ ? :
181 91 130 if ($$para{'TYPE'} eq 'TEXT') { }
8 122 elsif ($$para{'TYPE'} eq 'VERBATIM') { }
122 0 elsif ($$para{'TYPE'} eq 'COMMAND') { }
182 1 90 if $skip_region
185 0 8 if $skip_region
188 0 8 if ($$self{'titleflag'} != 0)
204 0 122 unless (exists $Pod::Xhtml::COMMANDS{$command})
211 29 93 if (/^head1/ and not $data_para)
213 29 0 unless $$self{'FragmentOnly'}
216 22 7 unless @{$$self{'sections'};} == 1
221 29 0 $$self{'TopLinks'} ? :
225 5 24 if ($anchor eq 'NAME')
228 24 69 if (/^head([234])/ and not $data_para)
230 0 24 if ($$self{'FragmentOnly'})
232 0 0 if $head_level > 6
235 24 0 unless @{$$self{'sections'};} == 1
243 36 33 if (/^item/ and not $data_para)
244 0 36 unless ($$self{'inList'})
253 14 22 if (@{$$self{'listKind'};} and $$self{'listKind'}[-1] == 0) { }
255 1 13 if ($parent_list and $parent_list == 1) { }
5 16 elsif ($parent_list and $parent_list == 2) { }
265 6 8 if ($paragraph eq '*') { }
276 10 12 if ($$self{'listKind'}[-1] == 1)
278 0 10 if $o ne 'li'
283 20 16 if (@{$$self{'listKind'};} and $$self{'listKind'}[-1] == 2)
284 12 8 if (@{$$self{'tagStack'};} and $$self{'tagStack'}[-1] eq 'dd')
286 0 12 if $o ne 'dd'
292 12 8 if ($$self{'MakeIndex'} >= 2)
299 0 20 if $o ne 'dt'
304 14 19 if (/^over/ and not $data_para)
308 8 6 if $$self{'MakeIndex'} >= 2
311 14 19 if (/^back/ and not $data_para)
313 0 14 if (--$$self{'inList'} < 0) { }
0 14 elsif ($listItems == 0) { }
6 8 elsif (@{$$self{'listKind'};} and $$self{'listKind'}[-1] == 1) { }
321 0 6 if $o ne 'li'
324 0 6 if $o ne 'ul'
333 0 8 if $o ne 'dl'
339 1 13 if ($parent_list and $parent_list == 1)
341 0 1 if $o ne 'li'
346 5 9 if ($parent_list and $parent_list == 2)
348 0 5 if $o ne 'p'
354 8 6 if ($$self{'MakeIndex'} >= 2)
355 4 4 if (not ref $$self{'sections'}[-1]) { }
356 3 1 if ($$self{'sections'}[-1] =~ /^over$/i)
360 4 0 if ($$self{'sections'}[-1][0] =~ /^item$/i)
370 1 18 if (/^for/ and not $data_para)
372 0 1 unless $ident =~ /(?:pod2)?xhtml/
373 1 0 if $html
375 2 17 if (/^begin/ and not $data_para)
380 2 15 if (/^end/)
382 0 2 unless (@{$$self{'dataSections'};})
387 0 2 unless ($current_section eq $ident)
401 5 93 if ($$self{'titleflag'} != 0)
404 8 90 if $paragraph =~ /^\s*
/im 
406 56 42 if (not @{$$self{'listKind'};} or $$self{'listKind'}[-1] == 0) { }
20 22 elsif (@{$$self{'listKind'};} and $$self{'listKind'}[-1] == 1) { }
407 51 5 if (not $no_wrap) { }
413 16 4 if ($$self{'listCurrentParas'}[-1]++ == 0) { }
421 20 2 if ($$self{'listCurrentParas'}[-1]++ == 0)
426 20 2 if (not $no_wrap) { }
446 5 67 if (ref $_) { }
449 0 67 $no_escape ? :
453 0 65 unless (exists $Pod::Xhtml::SEQ{$$seq{'-name'}})
473 0 130 unless defined $htmlarg
476 21 109 if ($$self{'section_names'}{$htmlarg}) { }
482 26 104 if ($$self{'section_ids'}{$index_id}++)
488 109 21 unless exists $$self{'section_names'}{$htmlarg}
500 2 9 if ($index_id = $$self{'section_names'}{$htmlarg}) { }
509 113 0 if (ref $elem) { }
511 53 60 if ($type =~ /^head(\d+)$/) { }
539 9 125 if (not ref $section) { }
543 5 4 if ($section =~ /^over$/i) { }
4 0 elsif ($section =~ /^back$/i) { }
562 12 113 if ($$section[0] =~ /^item$/i) { }
571 60 65 if $this_level == 0
573 22 43 if ($this_level > $previous_level) { }
7 36 elsif ($this_level < $previous_level) { }
587 32 4 unless $previous_section =~ /^over$/i
594 65 0 ref $section ? :
618 3 2 if ($paragraph =~ /^(.+?) - /) { }
0 2 elsif ($paragraph =~ /^(.+?): /) { }
0 2 elsif ($paragraph =~ /^(.+?)\.pm/) { }
654 7 43 if ($kind eq 'hyperlink') { }
13 30 elsif ($kind =~ /^bounceurl:(.+)$/) { }
17 13 elsif ($page eq '') { }
10 3 elsif (not $link =~ /\|/) { }
663 7 6 if ($string =~ /P<.+>/) { }
682 2 1 if $targ
705 0 9 if ($arg eq 'sol') { }
0 9 elsif ($arg eq 'verbar') { }
0 9 elsif ($arg =~ /^\d$/) { }
0 9 elsif ($arg =~ /^0?x(\d+)$/) { }