Branch Coverage

blib/lib/HTML/Packer.pm
Criterion Covered Total %
branch 75 94 79.7


line true false branch
143 71 5 $value ? :
76 256 if defined $value
163 30 42 if (defined $value)
164 27 3 if (grep(($value eq $_), @JAVASCRIPT_OPTS)) { }
1 2 elsif (not $value) { }
178 8 41 if (defined $value)
179 5 3 if (grep(($value eq $_), @CSS_OPTS)) { }
1 2 elsif (not $value) { }
236 5 0 $_[0]{'submatches'}[0] =~ /\n/s || $_[0]{'submatches'}[2] =~ /\n/s ? :
28 5 $remove_newlines ? :
33 3 $remove_comments ? :
242 2 1 !$remove_newlines && $_[0]{'submatches'}[0] =~ /\n/s ? :
1 2 !$remove_newlines && $_[0]{'submatches'}[2] =~ /\n/s ? :
33 3 $remove_comments ? :
256 25 0 if ($content) { }
257 3 22 $html5 ? :
258 3 22 $html5 ? :
261 17 8 if ($opening =~ /$opening_script_re/i and $opening =~ /$js_type_re/i || !($opening =~ /type/i)) { }
2 6 elsif ($opening =~ /$opening_style_re/i) { }
265 2 15 if $html5
267 17 0 if ($js_packer and $do_javascript)
270 15 2 unless ($html5)
276 1 1 if $html5
278 2 0 if ($css_packer and $do_stylesheet)
280 2 0 if $do_stylesheet eq 'pretty'
293 2 28 $remove_comments_aggressive ? :
324 34 0 if (ref $_[0] and $_[0]->isa('HTML::Packer')) { }
330 0 0 unless ref $_[0]
338 0 34 if (ref $input ne 'SCALAR')
346 0 34 if (defined wantarray) { }
347 0 0 ref $input ? :
353 34 0 ref $input ? :
356 34 0 if (ref $opts eq 'HASH')
358 68 102 if defined $opts->{$field}
361 24 10 if defined $opts->{'do_javascript'}
362 3 31 if defined $opts->{'do_stylesheet'}
365 1 33 if (not $self->no_compress_comment and ${$html;} =~ /$PACKER_COMMENT/s)
367 1 0 if ($compress eq '_no_compress_')
368 0 1 $cont eq 'scalar' ? :
384 1 32 if $remove_comments_aggressive
388 29 4 if ($self->remove_newlines)
392 4 29 if ($self->html5)
398 0 33 if $cont eq 'scalar'
404 28 6 unless ($self->{'_checked_javascript_packer'})
407 28 0 unless ($@)
422 28 6 unless ($self->{'_checked_css_packer'})
425 28 0 unless ($@)