Branch Coverage

blib/lib/XML/Minifier.pm
Criterion Covered Total %
branch 106 116 91.3


line true false branch
34 4 141 unless (defined $string)
38 2 139 if ($string eq "")
48 2 137 if ($opt{'remove_indent'})
53 1 138 if ($opt{'agressive'})
58 17 122 if ($opt{'insane'})
63 28 111 if ($opt{'destructive'})
68 36 103 if ($opt{'aggressive'})
69 36 0 unless defined $opt{'remove_empty_text'}
70 36 0 unless defined $opt{'remove_blanks_start'}
71 34 2 unless defined $opt{'remove_blanks_end'}
75 28 111 if ($opt{'destructive'})
76 27 1 unless defined $opt{'remove_spaces_line_start'}
77 27 1 unless defined $opt{'remove_spaces_line_end'}
81 17 122 if ($opt{'insane'})
82 17 0 unless defined $opt{'remove_spaces_everywhere'}
83 17 0 unless defined $opt{'remove_cr_lf_everywhere'}
89 1 138 if ($opt{'process_xincludes'})
106 62 77 unless $opt{'no_prolog'}
114 15 147 if ($flc->nodeType eq 14 or $flc->nodeType eq 10) { }
8 139 elsif ($flc->nodeType eq 7) { }
0 139 elsif ($flc->nodeType eq 8) { }
139 0 elsif ($flc->nodeType eq 1) { }
119 2 13 if $opt{'keep_dtd'}
127 9 6 if ($opt{'ignore_dtd'}) { }
131 10 4 if ($dc->nodeType == 15)
135 5 5 if ($dc->toString =~ //)
160 2 6 if $opt{'keep_pi'}
164 0 0 if $opt{'keep_comments'}
272 111424 0 if ($outnode)
284 477 111349 if ($child->nodeType eq 3) { }
2 111347 elsif ($child->nodeType eq 5) { }
32 111315 elsif ($child->nodeType eq 8) { }
20 111295 elsif ($child->nodeType eq 4) { }
8 111287 elsif ($child->nodeType eq 7) { }
111285 2 elsif ($child->nodeType eq 1) { }
288 6 471 if ($do_not_remove_blanks{$child->parentNode->getName}) { }
298 135 336 if $opt{'remove_blanks_start'}
300 125 346 if $opt{'remove_blanks_end'}
306 53 418 if $opt{'remove_cr_lf_everywhere'}
312 122 349 if $opt{'remove_spaces_line_start'}
314 102 369 if $opt{'remove_spaces_line_end'}
316 58 413 if $opt{'remove_spaces_everywhere'}
319 126 345 if $opt{'remove_empty_text'}
341 201 197 if ($child->nodeType eq 1)
349 205 197 if ($child->nodeType eq 1)
359 90 155 if ($child->nodeType eq 3)
360 4 86 if ($child->data =~ /[^ \t\r\n]/)
366 27 42 if ($child->nodeType eq 8 and $opt{'keep_comments'})
370 20 30 if ($child->nodeType eq 4 and $opt{'keep_cdata'})
374 8 18 if ($child->nodeType eq 7 and $opt{'keep_pi'})
379 8 178 if ($child->nodeType eq 5)
391 26 451 if ($we_have_infos_from_dtd) { }
260 258 elsif ($empty and @{$child->parentNode->childNodes;} > 1) { }
393 6 20 if ($do_not_remove_blanks{$child->parentNode->getName}) { }
401 0 260 if ($do_not_remove_blanks{$child->parentNode->getName}) { }
416 13 19 if $opt{'keep_comments'}
421 8 12 if $opt{'keep_cdata'}
426 2 6 if $opt{'keep_pi'}