Branch Coverage

blib/lib/HTML/Packer.pm
Criterion Covered Total %
branch 91 108 84.2


line true false branch
145 73 5 $value ? :
78 312 if defined $value
165 30 49 if (defined $value)
166 27 3 if (grep(($value eq $_), @JAVASCRIPT_OPTS)) { }
1 2 elsif (not $value) { }
180 8 48 if (defined $value)
181 5 3 if (grep(($value eq $_), @CSS_OPTS)) { }
1 2 elsif (not $value) { }
195 7 40 if (defined $value)
196 5 2 if (grep(($value eq $_), @CSP_OPTS)) { }
1 1 elsif (not $value) { }
255 5 0 $_[0]{'submatches'}[0] =~ /\n/s || $_[0]{'submatches'}[2] =~ /\n/s ? :
28 5 $remove_newlines ? :
33 3 $remove_comments ? :
261 2 1 !$remove_newlines && $_[0]{'submatches'}[0] =~ /\n/s ? :
1 2 !$remove_newlines && $_[0]{'submatches'}[2] =~ /\n/s ? :
33 3 $remove_comments ? :
275 45 0 if ($content) { }
276 9 36 $html5 ? :
277 9 36 $html5 ? :
280 26 19 if ($opening =~ /$opening_script_re/i and $opening =~ /$js_type_re/i || !($opening =~ /type/i)) { }
11 8 elsif ($opening =~ /$opening_style_re/i) { }
284 3 23 if $html5
286 17 9 if ($js_packer and $do_javascript)
289 15 2 unless ($html5)
294 9 17 if ($do_csp)
300 6 5 if $html5
302 2 9 if ($css_packer and $do_stylesheet)
304 2 0 if $do_stylesheet eq 'pretty'
307 9 2 if ($do_csp)
322 2 35 $remove_comments_aggressive ? :
353 41 0 if (ref $_[0] and $_[0]->isa('HTML::Packer')) { }
359 0 0 unless ref $_[0]
367 0 41 if (ref $input ne 'SCALAR')
375 0 41 if (defined wantarray) { }
376 0 0 ref $input ? :
382 41 0 ref $input ? :
385 41 0 if (ref $opts eq 'HASH')
387 70 135 if defined $opts->{$field}
390 24 17 if defined $opts->{'do_javascript'}
391 3 38 if defined $opts->{'do_stylesheet'}
392 7 34 if defined $opts->{'do_csp'}
395 1 40 if (not $self->no_compress_comment and ${$html;} =~ /$PACKER_COMMENT/s)
397 1 0 if ($compress eq '_no_compress_')
398 0 1 $cont eq 'scalar' ? :
418 1 39 if $remove_comments_aggressive
422 29 11 if ($self->remove_newlines)
426 6 34 if ($self->html5)
432 0 40 if $cont eq 'scalar'
438 35 6 unless ($self->{'_checked_javascript_packer'})
441 35 0 unless ($@)
456 35 6 unless ($self->{'_checked_css_packer'})
459 35 0 unless ($@)
474 3 4 unless $do_csp and %csp