Branch Coverage

blib/lib/Pod/DocBook.pm
Criterion Covered Total %
branch 166 216 76.8


line true false branch
31 16 1 if $$parser{'header'}
46 0 17 if ($$parser{'doctype'} eq 'refentry') { }
72 9 8 if (@{$$parser{'Pod::DocBook::errors'};})
88 11 85 if $command eq 'pod'
94 9 76 if ($command =~ /^head[1-4]/) { }
5 71 elsif ($command eq 'begin') { }
4 67 elsif ($command eq 'end') { }
0 67 elsif ($command eq 'for') { }
15 52 elsif ($command eq 'over') { }
36 16 elsif ($command eq 'item') { }
15 1 elsif ($command =~ /^back/) { }
110 0 0 if ($paragraph =~ /^(:\S+|docbook)/)
143 28 50 unless defined $state
144 77 1 unless $state eq 'begin docbook'
146 75 3 unless ($state eq 'begin docbook' or $state eq 'begin table')
151 0 78 if ($state eq 'name') { }
0 78 elsif ($state eq 'synopsis+') { }
0 78 elsif ($state eq 'synopsis') { }
1 77 elsif ($state eq 'begin docbook') { }
2 75 elsif ($state eq 'begin table') { }
2 73 elsif ($state =~ /^begin [^:]/) { }
1 72 elsif ($state eq 'over') { }
217 2 70 if $state eq 'verbatim'
234 42 30 unless $state eq 'verbatim' or $state eq ''
239 6 67 if (not $state =~ /^begin/ and $$parser{'fix_double_quotes'} and $para_out =~ /"/)
266 6 0 unless $state eq 'begin docbook'
276 6 0 if not defined $min_leader or length $leader < length $min_leader
287 0 6 if (not defined $state) { }
0 6 elsif ($state eq 'name') { }
0 6 elsif ($state eq 'synopsis+') { }
0 6 elsif ($state eq 'synopsis') { }
0 6 elsif ($state eq 'begin docbook') { }
0 6 elsif ($state =~ /^begin [^:]/) { }
0 6 elsif ($state eq 'over') { }
2 4 elsif ($state eq 'verbatim') { }
361 2 24 if (my $parent = $seq->nested)
362 2 0 if ($parent->cmd_name eq 'E' or $parent->cmd_name eq 'Z')
371 0 24 unless defined $argument
378 1 23 if ($command eq 'I') { }
1 22 elsif ($command eq 'B') { }
1 21 elsif ($command eq 'C') { }
10 11 elsif ($command eq 'L') { }
8 3 elsif ($command eq 'E') { }
1 2 elsif ($command eq 'F') { }
0 2 elsif ($command eq 'S') { }
1 1 elsif ($command eq 'X') { }
0 1 elsif ($command eq 'Z') { }
425 24 0 unless ($seq->nested)
488 0 0 if ($node->cmd_name eq 'L')
503 1 9 if ($type eq 'url') { }
509 2 7 if (defined $section and not defined $name) { }
2 5 elsif (defined $text) { }
4 1 elsif (defined $name) { }
512 1 1 if defined $text
523 2 2 if ($name =~ /(.+?)\((.+)\)/) { }
531 2 2 if (defined $section) { }
553 2 6 if (not $argument =~ /\A\w+\z/) { }
1 5 elsif ($argument eq 'verbar') { }
1 4 elsif ($argument eq 'sol') { }
0 4 elsif ($argument eq 'lchevron' or $argument eq 'laquo') { }
0 4 elsif ($argument eq 'rchevron' or $argument eq 'raquo') { }
1 3 elsif ($argument =~ /^0x/) { }
1 2 elsif ($argument =~ /^0/) { }
1 1 elsif ($argument =~ /^\d+$/) { }
598 0 9 if ($$parser{'doctype'} eq 'refentry' and $command eq 'head1' and $paragraph eq 'NAME') { }
0 9 elsif ($$parser{'doctype'} eq 'refentry' and $command eq 'head1' and $paragraph eq 'SYNOPSIS') { }
612 0 9 if ($$parser{'doctype'} eq 'refentry') { }
630 1 35 unless defined $state
632 0 36 if ($state eq 'verbatim')
635 0 0 unless defined $state
638 0 36 if ($state =~ /list\+$/)
642 14 22 if ($state eq 'over') { }
18 4 elsif ($state =~ /^o?list/) { }
3 1 elsif ($state =~ /^vlist/) { }
644 2 12 if (not defined $paragraph or $paragraph =~ /^\s*$/ or $paragraph eq '*') { }
10 2 elsif ($paragraph =~ /^([1aAiI])\.?$/) { }
697 18 0 unless $state =~ /\+$/
735 17 84 if ($what eq 'THE END') { }
9 75 elsif ($what =~ /^head(\d)/) { }
748 42 0 if ($what eq 'item' || $what eq 'over' and $state eq 'over' || $state =~ /^(o|v)?list/)
755 0 37 if ($state =~ /list\+$/)
760 15 22 if ($state =~ /^head(\d)/) { }
1 21 elsif ($state eq 'indent') { }
2 19 elsif ($state eq 'list') { }
10 9 elsif ($state eq 'olist') { }
2 7 elsif ($state eq 'vlist') { }
0 7 elsif ($state =~ /^synopsis/) { }
0 7 elsif ($state eq 'name') { }
2 5 elsif ($state eq 'verbatim') { }
5 0 elsif ($state =~ /^begin (.+)/) { }
0 0 elsif ($state eq 'over') { }
763 6 9 if ($level > $prev_level) { }
774 1 8 if ($state =~ /\+$/)
781 0 9 if ($$parser{'doctype'} eq 'refentry') { }
794 0 1 if $what eq 'item'
797 1 0 if $what eq 'back'
809 2 0 if $what eq 'back'
821 10 0 if $what eq 'back'
835 2 0 if $what eq 'back'
839 0 0 if $state eq 'synopsis+'
867 4 1 if ($what =~ /^end (.+)/) { }
1 0 elsif ($what eq 'THE END') { }
870 3 1 if ($end_format eq $begin_format) { }
871 1 2 if ($end_format eq 'docbook')
899 0 1 if ($begin_format eq 'docbook')
936 4 12 if not defined $columns or @fields > $columns
956 5 1 if (grep {$_ eq $spec;} 'left', 'right', 'center', 'justify') { }
1018 2 2 if (defined $volnum) { }