Branch Coverage

blib/lib/JavaScript/Packer.pm
Criterion Covered Total %
branch 100 126 79.3


line true false branch
166 5 3 $value ? :
8 91 if defined $value
179 46 80 if (defined $value and not ref $value)
186 14 112 if ($$self{"_" . $field})
208 29 134 if (defined $value)
209 21 8 if (grep(($value eq $_), @COMPRESS_OPTS)) { }
0 8 elsif (not $value) { }
309 2 1835 if ($submatches->[0] eq ':') { }
6 1829 elsif ($submatches->[1] eq '#') { }
4 1825 elsif ($submatches->[1] eq '@') { }
329 7 171 if ($submatches->[0] =~ m[^/\*\@(.*)\@\*/$]ms)
344 62 155 if $reggrp eq "data_store" or $reggrp eq "concat_store"
357 33 9 if (ref $_[0] and ref $_[0] eq 'JavaScript::Packer') { }
362 0 9 unless ref $_[0]
370 0 42 if (ref $input ne "SCALAR")
378 0 42 if (defined wantarray) { }
379 0 0 ref $input ? :
385 42 0 ref $input ? :
388 27 15 if (ref $opts eq "HASH")
390 4 50 if defined $opts->{$field}
394 23 31 if defined $opts->{$field}
405 3 39 if (${$javascript;} =~ /$COPYRIGHT_COMMENT/ism)
412 1 41 if (not $self->no_compress_comment and ${$javascript;} =~ /$PACKER_COMMENT/)
414 1 0 if ($compress eq "_no_compress_")
415 0 1 if $cont eq "scalar"
431 17 24 if ($self->compress ne "clean")
457 7 34 if ($self->compress eq "obfuscate" or $self->compress eq "best")
470 151 2969 if (exists $words->{$word}{'encoded'} and $words->{$word}{'encoded'} eq $word)
476 209 2760 if (exists $words->{$encoded})
478 58 151 if (exists $words->{$encoded}{'encoded'})
488 58 151 if $next
506 2760 209 if ($words->{$_}{'encoded'} ne $_) { }
518 3 4 if scalar @pattern > 62
524 7 0 if ($pd) { }
530 3 4 if ($size > 62)
542 1 2 if ($ord >= 65) { }
1 1 elsif ($ord == 57) { }
0 1 elsif ($ord == 50) { }
1 0 elsif ($ord == 49) { }
543 0 1 if ($c eq 'Z') { }
549 0 1 if ($ord > 97) { }
0 1 elsif ($ord > 65) { }
1 0 elsif ($ord == 65) { }
574 0 3 $mul > 1 ? :
576 0 3 if $is62
578 0 3 if ($mul > 1)
593 7 0 length $pk ? :
599 3 0 $pc > 36 ? :
3 4 $pc > 10 ? :
612 5 2 if ($self->compress eq "obfuscate" or $packed_length <= length ${$javascript;})
626 40 1 unless ($self->remove_copyright)
635 0 41 if $cont eq "scalar"
655 181 351 if ($blocktype eq 'function') { }
671 1 180 grep(($_ eq '_no_shrink_'), @vars) ? :
674 180 1 if ($do_shrink)
680 180 1 if ($do_shrink)
684 468 0 if (length $block_var)
717 0 70 $m > 25 ? :
719 0 70 if ($c >= 52)
723 0 70 if $ret =~ /^(do|if|in)$/
733 2861 1606 $m > 9 ? :
1254 4467 $m > 35 ? :
735 2749 2972 if ($c >= 62)