Branch Coverage

lib/Petal/Canonicalizer/XML.pm
Criterion Covered Total %
branch 70 80 87.5


line true false branch
37 206 0 ref $data_ref ? :
58 133 69 unless $Petal::CURRENT_INCLUDES > 1
144 7 1299 if $class->_is_inside_content_or_replace
156 46 1253 if $class->_is_xinclude($tag) and $class->_xinclude($tag, $att)
163 1224 29 unless ($class->_is_inside_content_or_replace)
169 86 1922 if $key =~ /^$petal:/
194 57 1930 if $key =~ /^$petal:/
196 45 1885 if ($value =~ /^<\?attr/) { }
206 3 1881 $_ =~ /$Petal::CodeGenerator::PI_RE/s ? :
220 5 1219 if (defined $$att{"${petal}:omit-tag"}) { }
224 1 4 defined $att_str && $att_str ? :
230 744 475 defined $att_str && $att_str ? :
254 12 1294 if $class->_is_inside_content_or_replace('endtag')
259 46 1248 if $class->_is_xinclude($tag)
261 1224 24 unless (defined $node->{'replace'} and $node->{'replace'})
263 5 1219 if (exists $node->{'omit-tag'}) { }
279 1224 24 unless (defined $node->{'replace'} and $node->{'replace'})
281 4 1220 if (exists $node->{'on-error'})
297 101 2017 if $class->_is_inside_content_or_replace
326 1422 17433 if $endtag
329 9 1413 if defined $tmp and $tmp->{'use-macro'}
334 142 63728 if defined $Petal::Canonicalizer::XML::NodeStack[$i]{'replace'} or defined $Petal::Canonicalizer::XML::NodeStack[$i]{'content'} or defined $Petal::Canonicalizer::XML::NodeStack[$i]{'use-macro'}
336 1402 17229 if defined $tmp
351 270 26 defined $_ && $_ ? :
357 26 244 $_ eq '' ? :
368 9 1402 if $class->_is_inside_content_or_replace
389 9 1402 if $class->_is_inside_content_or_replace
411 9 1402 if $class->_is_inside_content_or_replace
434 9 1402 if $class->_is_inside_content_or_replace
456 9 1402 if $class->_is_inside_content_or_replace
486 9 1355 if $class->_is_inside_content_or_replace
512 0 1411 if $class->_is_inside_content_or_replace
533 0 1326 if $class->_is_inside_content_or_replace
545 0 53 unless defined $string
546 0 53 if $string =~ /^\s*$/
548 0 53 unless (defined $attr and defined $expr)
569 0 1326 if $class->_is_inside_content_or_replace
594 0 47 if $class->_is_inside_content_or_replace
599 47 0 if ($class->_is_xinclude($tag))
603 0 47 $_ =~ /^$petal:/ ? :