Condition Coverage

blib/lib/XML/Smart/DTD.pm
Criterion Covered Total %
condition 52 119 43.7


and 3 conditions

line !l l&&!r l&&r condition
94 0 69 0 $$this{'tree'}{$tag} and $$this{'tree'}{$tag}{'children'}
189 0 63 0 $$this{'tree'}{$tag} and $$this{'tree'}{$tag}{'children'}
277 0 39 0 $$this{'tree'}{$tag} and $attr_check
281 6 0 30 $opt and $opt =~ /#REQUIRED/i
292 0 0 0 $$this{'tree'}{$tag} and $$this{'tree'}{$tag}{'attributes'}{$attr}
307 0 0 0 $$this{'tree'}{$tag} and $$this{'tree'}{$tag}{'attributes'}{$attr}
321 0 6 0 $$this{'tree'}{$tag} and $$this{'tree'}{$tag}{'attributes'}{$attr}
333 0 0 0 $$this{'tree'}{$tag} and $$this{'tree'}{$tag}{'attributes'}{$attr}
348 0 0 30 $$this{'tree'}{$tag}{'childrenARR'} and @{$$this{'tree'}{$tag}{'childrenARR'};}
377 0 36 0 $$this{'tree'}{$tag} and $$this{'tree'}{$tag}{'attr_order'}
410 0 0 6 $$this{'ERRORS'} and @{$$this{'ERRORS'};}
458 0 9 0 ++$replacements < 1000 and $xml =~ s/([&%]$name);/exists $definitions{$1} ? $definitions{$1} : "$1\cA;";/eg
471 18 0 0 $children =~ s/^\((#PCDATA(?:\|$name)+)\)$/$1/o and $option eq '*'
483 36 0 39 $child =~ s/([\?\*\+])$// and $option = $1
508 24 0 9 $default and $default =~ /^"(.*?)"$/
24 0 0 $default and $default =~ /^'(.*?)'$/
583 0 4 0 ++$replacements < 1000 and $xml =~ s/([&%]$name);/exists $definitions{$1} ? $definitions{$1} : "$1\cA;";/eg
728 0 6 0 $dtd and $dtd->tree
0 6 0 $dtd and $dtd->tree and %{$dtd->tree;}
750 6 0 45 $tag ne '' and $dtd->elem_exists($tag)
809 69 0 6 $tag eq '' and $dtd->elem_exists($Key)
0 30 39 $tag ne '' and $dtd->child_exists($tag, $Key)
0 0 30 $tag ne '' and $dtd->attr_exists($tag, $Key)
810 43 2 0 $$tree{'/nodes'}{$Key} and $$tree{'/nodes'}{$Key} =~ /^(\w+,\d+),(\d*)/
819 0 6 3 $tag ne '' and not $dtd->is_elem_child_multi($tag, $Key)
827 27 0 3 ref $$tree{$Key} eq 'HASH' and exists $$tree{$Key}{'CONTENT'}
27 3 0 ref $$tree{$Key} eq 'HASH' and exists $$tree{$Key}{'CONTENT'} and keys %{$$tree{$Key};} == 1
837 0 27 3 $tag ne '' and $$tree{$Key} eq ''
842 0 0 0 $prev_exists and not $opts{'no_delete'}
858 0 0 9 $tag ne '' and $dtd->elem_exists($tag)
0 0 0 $tag ne '' and $dtd->attr_exists($prev_tag, $tag)
862 6 0 0 ref $$prev_tree{$tag} eq 'HASH' and not exists $$prev_tree{$tag}{'CONTENT'}
870 0 0 0 ref $$prev_tree{$tag} eq 'HASH' and exists $$prev_tree{$tag}{'CONTENT'}
0 0 0 ref $$prev_tree{$tag} eq 'HASH' and exists $$prev_tree{$tag}{'CONTENT'} and keys %{$$prev_tree{$tag};} == 1

or 2 conditions

line l !l condition
786 14 4 $in_order{$order_i} || 1

or 3 conditions

line l !l&&r !l&&!r condition
807 0 19 122 $Key eq '' or $Key eq '/order'
19 17 105 $Key eq '' or $Key eq '/order' or $Key eq '/nodes'
36 30 75 $Key eq '' or $Key eq '/order' or $Key eq '/nodes' or $Key eq 'CONTENT'
809 6 0 69 $tag eq '' and $dtd->elem_exists($Key) or $tag ne '' and $dtd->child_exists($tag, $Key)
862 3 0 6 not ref $$prev_tree{$tag} or ref $$prev_tree{$tag} eq 'HASH' and not exists $$prev_tree{$tag}{'CONTENT'}