Branch Coverage

blib/lib/App/cpanminus/reporter.pm
Criterion Covered Total %
branch 110 192 57.2


line true false branch
31 0 21 if ($params{'cpanm'})
57 41 148 if exists $params{$option}
69 60 18 if $author
75 60 16 if $distfile
81 21 7 if $config
87 1 256 if $verbose
93 0 18 if $all
99 21 18 if $max_age
105 20 21 if $force
111 18 70 if $ignore_versions
117 3 8 if ($quiet)
126 0 2 if $dry_run
132 2 4 if $skip
138 1 73 if ($only)
150 1 73 if ($exclude)
162 21 5 if $dir
168 21 19 if $file
174 0 0 if $cpanm
183 0 0 if (-e $filename) { }
184 0 0 unless ($config->read)
192 0 0 if ($answer =~ /^y/i) { }
214 0 0 if (not $self->force and $mtime and $age_in_minutes > $max_age)
215 0 0 if ($self->all) { }
241 0 18 if ($self->all) { }
243 0 0 if (-e $workdir) { }
244 0 0 unless opendir my $dh, $workdir
245 0 0 if $_ ne "."
249 0 0 if (-e $logfile and not -d _)
270 0 18 unless $self->_check_cpantesters_config_data
280 0 18 unless $self->_check_build_log($logfile)
282 0 18 unless open my $fh, "<", $logfile
286 18 0 if ($header =~ /^cpanm \(App::cpanminus\) (\d+\.\d+) on perl (\d+\.\d+)/) { }
306 72 18 if $dist
314 71 7327 if (/^Fetching (\S+)/) { }
72 7255 elsif (/^Entering (\S+)/) { }
73 7182 elsif (/^Running (?:Build|Makefile)\.PL/) { }
68 8317 elsif ($dist and /^Building .*(?:$dist|$dist_vstring)/) { }
315 0 71 if /CHECKSUMS$/
317 17 54 unless $resource
322 0 72 if ($recording and $recording eq 'test') { }
326 0 72 if $self->verbose
328 0 72 if $self->verbose
336 0 68 if $self->verbose
337 67 1 if /and testing/
345 5856 1470 if $recording
348 5856 1470 if ($recording)
349 69 5787 if (/^Result: (PASS|NA|FAIL|UNKNOWN|NOTESTS)/ or $recording eq 'test' and /^-> (FAIL|OK)/) { }
2 5785 elsif ($recording eq 'configure' and m[^-> N/A]) { }
2 5783 elsif ($recording eq 'configure' and /Configure failed for (?:$dist|$dist_vstring)/ || m[proper Makefile.PL/Build.PL] || /configure the distribution/) { }
353 0 69 if ($result eq 'FAIL' and $recording eq 'configure') { }
1 68 elsif ($result eq 'FAIL' and @test_output > 1 and $test_output[-2] =~ /make.*?[1-9]/) { }
4 64 elsif ($result eq 'OK') { }
0 64 elsif ($result eq 'NOTESTS') { }
361 3 1 $has_tests ? :
377 2 0 $found_na ? :
380 71 7255 if ($result)
384 1 70 if (@test_output <= 2) { }
0 70 elsif (not $resource) { }
0 70 elsif (defined $self->exclude and exists $self->exclude->{$dist_without_version}) { }
0 70 elsif (defined $self->only and not exists $self->only->{$dist_without_version}) { }
1 69 elsif (not $self->ignore_versions and defined $self->{'_perl_version'} and $self->{'_perl_version'} ne $]) { }
392 0 0 if $self->verbose
395 0 0 if $self->verbose
398 0 1 if $self->verbose
408 0 18 if $self->verbose
410 0 18 if not $found and $self->verbose
411 0 18 if $self->verbose
419 1 60 if ($path->scheme eq 'file') { }
432 1 0 if $path[-1] eq ""
434 1 0 if (@path >= 3 and $path[-1] =~ /\A[A-Z\-]+\z/ and substr($path[-1], 0, 2) eq $path[-2] and substr($path[-1], 0, 1) eq $path[-3]) { }
442 0 0 if $self->verbose
455 0 0 if $self->verbose
457 0 60 unless $metadata
470 0 61 unless ($eligible_schemes{$scheme})
471 0 0 unless $self->quiet
478 0 61 unless (defined $author)
479 0 0 unless $self->quiet
485 1 60 if ($author eq "LOCAL")
486 0 1 unless $self->quiet
501 1 3 if (index($dist, "Local-") == 0)
502 0 1 unless $self->quiet
506 1 2 unless $self->parse_uri($resource)
519 0 2 $meta && ref $meta ? :
521 0 2 if (not $self->skip_history and $client->is_duplicate) { }
522 0 0 if $self->verbose
527 0 2 unless $self->quiet
541 0 2 if ($self->dry_run)
542 0 0 unless $self->quiet
547 0 2 unless $reporter->send
550 0 0 unless $self->quiet
551 0 0 if $self->verbose
553 0 2 unless $self->skip_history
564 0 8 if (-e $meta_path)
566 0 0 if $@
568 0 0 if (not $meta->{'meta-spec'} or $meta->{'meta-spec'}{'version'} < 2)
580 0 21 $^O eq 'MSWin32' && "$]" < 5.016 ? :