Branch Coverage

blib/lib/XML/DTDParser.pm
Criterion Covered Total %
branch 45 98 45.9


line true false branch
27 0 0 unless open my $IN, "< $file"
32 0 0 if ($filename eq $file) { }
52 0 0 unless $percent
57 0 0 unless open $IN, "<$include"
71 18 1 if ($value =~ /^'/) { }
0 1 elsif ($value =~ /^"/) { }
78 0 8 if $info ne ''
80 0 8 unless exists $info{'element'}
84 2 6 if (exists $info{'attribute'}) { }
98 0 0 unless $percent
104 0 0 exists $definitions{$1} ? :
105 0 1 if $xml =~ /([&%]$name);/o
117 7 3 if ($children eq '(#PCDATA)') { }
0 3 elsif ($children =~ s/^\((#PCDATA(?:\|$name)+)\)$/$1/o and $option eq '*') { }
126 0 10 unless $children =~ /^#?$nameX(?:,$nameX)*$/o
132 15 2 unless $child =~ s/([?*+])$// and $option = $1
135 1 16 if (exists $elements{$element}{'children'}{$child}) { }
137 1 0 unless $child eq '#PCDATA'
141 9 7 unless $child eq '#PCDATA'
144 10 7 unless $child eq '#PCDATA'
148 7 3 if @{$elements{$element}{'childrenARR'};} == 0
153 0 0 if (uc $param eq 'ANY') { }
162 0 2 unless exists $elements{$element}
166 0 4 if ($option =~ /^#FIXED\s+["'](.*)["']$/i) { }
0 4 elsif ($option =~ /^["'](.*)["']$/i) { }
174 0 4 if ($type =~ /^(?:NOTATION\s*)?\(\s*(.*?)\)$/)
184 0 1 if $xml =~ /\S/
189 7 9 if ($child eq '#PCDATA') { }
193 0 9 unless exists $elements{$child}
195 0 9 if (exists $elements{$child}{'parent'}) { }
203 7 3 if (scalar keys %{$elements{$element}{'children'};} == 0)
206 6 4 if (exists $elementinfo{$element})
211 2 8 if (exists $attribinfo{$element})
224 0 3 if ($children =~ /\|/)
229 0 3 if ($option)
242 0 3 if ($option)
297 1 0 if ($c1 =~ /^\d+$/) { }
0 0 elsif ($c1 =~ /^(\d+)..(\d+)$/) { }
0 0 elsif ($c1 =~ /^(\d+)..$/) { }
298 0 1 if ($c2 =~ /^\d+$/) { }
0 1 elsif ($c2 =~ /^(\d+)..(\d+)$/) { }
1 0 elsif ($c2 =~ /^(\d+)..$/) { }
307 0 0 if ($c2 =~ /^\d+$/) { }
0 0 elsif ($c2 =~ /^(\d+)..(\d+)$/) { }
0 0 elsif ($c2 =~ /^(\d+)..$/) { }
316 0 0 if ($c2 =~ /^\d+$/) { }
0 0 elsif ($c2 =~ /^(\d+)..(\d+)$/) { }
0 0 elsif ($c2 =~ /^(\d+)..$/) { }
330 0 0 unless (exists $$elements{$element}{'parent'})