Branch Coverage

blib/lib/JavaScript/Packer.pm
Criterion Covered Total %
branch 104 130 80.0


line true false branch
168 5 3 $value ? :
8 91 if defined $value
181 46 80 if (defined $value and not ref $value)
188 14 112 if ($$self{"_" . $field})
210 29 134 if (defined $value)
211 21 8 if (grep(($value eq $_), @COMPRESS_OPTS)) { }
0 8 elsif (not $value) { }
266 1 3210 unless $rest
272 1 3210 unless $rest
313 1 1835 if ($submatches->[0] eq ':') { }
6 1829 elsif ($submatches->[1] eq '#') { }
4 1825 elsif ($submatches->[1] eq '@') { }
333 7 171 if ($submatches->[0] =~ m[^/\*\@(.*)\@\*/$]ms)
348 62 155 if $reggrp eq "data_store" or $reggrp eq "concat_store"
361 33 9 if (ref $_[0] and ref $_[0] eq 'JavaScript::Packer') { }
366 0 9 unless ref $_[0]
374 0 42 if (ref $input ne "SCALAR")
382 0 42 if (defined wantarray) { }
383 0 0 ref $input ? :
389 42 0 ref $input ? :
392 27 15 if (ref $opts eq "HASH")
394 4 50 if defined $opts->{$field}
398 23 31 if defined $opts->{$field}
409 3 39 if (${$javascript;} =~ /$COPYRIGHT_COMMENT/ism)
416 1 41 if (not $self->no_compress_comment and ${$javascript;} =~ /$PACKER_COMMENT/)
418 1 0 if ($compress eq "_no_compress_")
419 0 1 if $cont eq "scalar"
435 17 24 if ($self->compress ne "clean")
461 7 34 if ($self->compress eq "obfuscate" or $self->compress eq "best")
474 151 2971 if (exists $words->{$word}{'encoded'} and $words->{$word}{'encoded'} eq $word)
480 209 2762 if (exists $words->{$encoded})
482 58 151 if (exists $words->{$encoded}{'encoded'})
492 58 151 if $next
510 2762 209 if ($words->{$_}{'encoded'} ne $_) { }
522 3 4 if scalar @pattern > 62
528 7 0 if ($pd) { }
534 3 4 if ($size > 62)
546 1 2 if ($ord >= 65) { }
1 1 elsif ($ord == 57) { }
0 1 elsif ($ord == 50) { }
1 0 elsif ($ord == 49) { }
547 0 1 if ($c eq 'Z') { }
553 0 1 if ($ord > 97) { }
0 1 elsif ($ord > 65) { }
1 0 elsif ($ord == 65) { }
578 0 3 $mul > 1 ? :
580 0 3 if $is62
582 0 3 if ($mul > 1)
597 7 0 length $pk ? :
603 3 0 $pc > 36 ? :
3 4 $pc > 10 ? :
616 5 2 if ($self->compress eq "obfuscate" or $packed_length <= length ${$javascript;})
630 40 1 unless ($self->remove_copyright)
639 0 41 if $cont eq "scalar"
659 181 330 if ($blocktype eq 'function') { }
675 1 180 grep(($_ eq '_no_shrink_'), @vars) ? :
678 180 1 if ($do_shrink)
684 180 1 if ($do_shrink)
688 468 0 if (length $block_var)
721 0 70 $m > 25 ? :
723 0 70 if ($c >= 52)
727 0 70 if $ret =~ /^(do|if|in)$/
737 2861 1606 $m > 9 ? :
1258 4467 $m > 35 ? :
739 2751 2974 if ($c >= 62)