Branch Coverage

blib/lib/Code/CutNPaste.pm
Criterion Covered Total %
branch 57 98 58.1


line true false branch
156 0 4 unless ($self->noutf8)
158 0 0 if $@
162 0 4 unless defined $self->window
163 0 4 unless defined $self->threshold
165 4 0 if (-d $cache_dir) { }
185 0 4 if $self->verbose
200 0 4 if $self->verbose
208 0 9 if $self->verbose
209 6 3 if my $pid = $fork->start
216 0 1 if ($self->verbose)
225 0 1 unless $self->_find_dups_called
233 0 3 unless my $code1 = $self->_get_text($first)
234 0 3 unless my $code2 = $self->_get_text($second)
241 71 9 if ($in_second{$$code1[$i]{'key'}})
242 65 6 if ($i == $last_found + 1)
248 0 3 if ($matches_found < $window)
256 9 20 unless $in_second{$$code1[$i]{'key'}}
264 143 373 if ($code1[$k]{'key'} eq $code2[$k]{'key'}) { }
267 63 80 if ($length1 > $longest)
271 26 117 if ($length2 > $longest)
282 7 370 if ($matches >= $window)
283 4 3 if $self->_match_below_threshold($matches, \@code1)
286 3 374 if ($matches >= $window)
306 0 3 if ($ignore and $report =~ /$ignore/)
331 0 7 unless $self->threshold
335 62 29 if $$code[$_]{'code'} =~ /\w/
349 3 3 if (-f $filename) { }
359 0 0 if $retry++ > 3
371 0 3 unless @contents
372 3 0 if $stderr =~ /syntax OK/
373 0 3 if ($stderr and not $self->_could_not_deparse->{$file})
374 0 0 if $self->show_warnings
388 0 3 unless @munged
389 3 0 if $stderr =~ /syntax OK/
390 0 3 if ($stderr and not $self->_could_not_deparse->{$file})
391 0 0 if $self->show_warnings
402 0 6 if $self->_could_not_deparse->{$file}
406 0 6 if (@$contents != @$munged)
424 112 152 if ($line =~ /^#line\s+([0-9]+)/)
448 0 834 if /^\s*(?:use|require)\b/
449 306 528 if /^\s*$/
450 0 528 if /^#(?!line\s+[0-9]+)/
463 0 528 if (/^sub BEGIN \{/) { }
0 1056 elsif ($skip{'sub_begin'} and /^}/) { }
473 528 0 unless $skip
483 0 152 if ($$contents[$i]{'code'} =~ /^(\s*)BEGIN\s*\{/)
485 0 0 if ($$contents[$i + 1]{'code'} =~ /^$padding}/)
518 0 4 if ($jobs > 1) { }
521 0 0 if ($_ < $jobs) { }