Branch Coverage

Clean.pm
Criterion Covered Total %
branch 21 48 43.7


line true false branch
115 1 3 unless $attr
125 0 3 if $attr =~ m[/$]
136 4 0 unless $attr =~ m[/$]
148 0 0 unless @stack
162 0 0 if (not @tmp_stack and ($#stack != 0 and $stack[0] ne $element))
175 7 0 if defined $element
191 2 1 unless $encoding
193 2 1 if ($version)
195 2 0 unless ($text =~ /^<\?xml[^<>]*\?>\s*(]*>)?\s*<\w+[^<>]*>/s)
197 1 1 if $root
204 3 0 if defined $text
205 1 2 unless $output
210 0 2 if ($version and $$options{'force_root'} and not $text =~ /<${root}[^<>]*>/s)
217 3 0 if (defined $text)
224 4 0 if ($cont =~ /^\w+/s) { }
0 0 elsif ($cont =~ m[^/\w+]s) { }
226 3 1 if ($cont =~ /(\w*?)\s(.*)/s) { }
237 0 0 if ($cont =~ m[^/(\w*?)\s(.*)]s) { }
255 3 0 if defined $text
270 0 0 unless $version
272 0 0 unless open FILE, "<$filename"
278 0 0 unless close FILE
282 0 0 unless open FILE, ">$filename"
286 0 0 unless close FILE