Branch Coverage

blib/lib/JavaScript/Packer.pm
Criterion Covered Total %
branch 107 130 82.3


line true false branch
178 5 3 $value ? :
8 111 if defined $value
191 56 100 if (defined $value and not ref $value)
198 14 142 if ($$self{'_' . $field})
220 34 164 if (defined $value)
221 26 8 if (grep(($value eq $_), @COMPRESS_OPTS)) { }
0 8 elsif (not $value) { }
276 1 3249 unless $rest
282 1 3249 unless $rest
323 1 1846 if ($submatches->[0] eq ':') { }
6 1840 elsif ($submatches->[1] eq '#') { }
4 1836 elsif ($submatches->[1] eq '@') { }
343 7 171 if ($submatches->[0] =~ m[^/\*\@(.*)\@\*/$]ms)
358 66 165 if $reggrp eq "data_store" or $reggrp eq "concat_store"
371 43 9 if (ref $_[0] and ref $_[0] eq __PACKAGE__) { }
376 0 9 unless ref $_[0]
384 0 52 if (ref $input ne "SCALAR")
392 5 47 if (defined wantarray) { }
393 5 0 ref $input ? :
399 47 0 ref $input ? :
402 37 15 if (ref $opts eq "HASH")
404 4 70 if defined $opts->{$field}
408 28 46 if defined $opts->{$field}
419 3 49 if (${$javascript;} =~ /$COPYRIGHT_COMMENT/ism)
426 1 51 if (not $self->no_compress_comment and ${$javascript;} =~ /$PACKER_COMMENT/)
428 1 0 if ($compress eq "_no_compress_")
429 0 1 if $cont eq "scalar"
445 17 34 if ($self->compress ne "clean")
471 7 44 if ($self->compress eq "obfuscate" or $self->compress eq "best")
484 151 2971 if (exists $words->{$word}{'encoded'} and $words->{$word}{'encoded'} eq $word)
490 209 2762 if (exists $words->{$encoded})
492 58 151 if (exists $words->{$encoded}{'encoded'})
502 58 151 if $next
520 2762 209 if ($words->{$_}{'encoded'} ne $_) { }
532 3 4 if scalar @pattern > 62
538 7 0 if ($pd) { }
544 3 4 if ($size > 62)
556 1 2 if ($ord >= 65) { }
1 1 elsif ($ord == 57) { }
0 1 elsif ($ord == 50) { }
1 0 elsif ($ord == 49) { }
557 0 1 if ($c eq 'Z') { }
563 0 1 if ($ord > 97) { }
0 1 elsif ($ord > 65) { }
1 0 elsif ($ord == 65) { }
588 0 3 $mul > 1 ? :
590 0 3 if $is62
592 0 3 if ($mul > 1)
607 7 0 length $pk ? :
613 3 0 $pc > 36 ? :
3 4 $pc > 10 ? :
626 5 2 if ($self->compress eq "obfuscate" or $packed_length <= length ${$javascript;})
640 50 1 unless ($self->remove_copyright)
649 5 46 if $cont eq "scalar"
669 181 330 if ($blocktype eq 'function') { }
685 1 180 grep(($_ eq '_no_shrink_'), @vars) ? :
688 180 1 if ($do_shrink)
694 180 1 if ($do_shrink)
698 468 0 if (length $block_var)
731 0 70 $m > 25 ? :
733 0 70 if ($c >= 52)
737 0 70 if $ret =~ /^(do|if|in)$/
747 2861 1606 $m > 9 ? :
1258 4467 $m > 35 ? :
749 2751 2974 if ($c >= 62)