Branch Coverage

lib/Perl/PrereqScanner/NotQuiteLite/App.pm
Criterion Covered Total %
branch 129 202 63.8


line true false branch
29 245 0 unless $key =~ /\-/
35 4 46 unless defined $opts{'parsers'}
36 7 43 unless defined $opts{'recommends'}
37 7 43 unless defined $opts{'suggests'}
40 15 35 if $opts{'save_cpanfile'}
42 12 38 if ($opts{'features'} and ref $opts{'features'} ne "HASH")
44 10 2 if (not ref $opts{'features'}) { }
2 0 elsif (ref $opts{'features'} eq 'ARRAY') { }
64 2 48 if ($opts{'ignore'} and ref $opts{'ignore'} eq "ARRAY")
74 1 49 if ($opts{'private'} and ref $opts{'private'} eq "ARRAY")
83 2 48 if ($opts{'optional'} and ref $opts{'optional'} eq "ARRAY")
92 3 47 if ($opts{'optional_re'})
96 0 50 if (my $index_name = delete $opts{'use_index'})
98 0 0 if (eval "require $index_package; 1")
103 2 48 if ($opts{'scan_also'})
113 50 0 unless (@args)
121 0 50 if ($self->{'blib'} and -d 'File::Spec'->catdir($self->{'base_dir'}, 'blib')) { }
130 45 5 unless $self->{'libs'}
133 0 50 if $self->{'develop'}
136 0 50 if ($self->{'verbose'})
142 46 350 'File::Spec'->file_name_is_absolute($path) ? :
143 40 331 -f $item ? :
25 371 if (-d $item) { }
153 7 43 if ($self->{'exclude_core'})
157 0 50 if ($self->{'index'})
163 22 28 if ($self->{'print'} or $self->{'cpanfile'})
164 0 22 if ($self->{'json'}) { }
22 0 elsif ($self->{'cpanfile'}) { }
0 0 elsif ($self->{'print'}) { }
166 0 0 unless eval { do { require JSON::PP } }
169 0 22 unless eval { do { require Perl::PrereqScanner::NotQuiteLite::Util::CPANfile } }
173 0 22 if $self->{'index'}
175 15 7 if ($self->{'save_cpanfile'}) { }
7 0 elsif ($self->{'print'}) { }
200 0 0 if $module eq "perl"
202 0 0 unless $version =~ /^[0-9]+(?:\.[0-9]+)?$/
203 0 0 $version eq '0' ? :
212 0 63 if $self->{'develop'}
213 0 7 $self->{'recommends'} ? :
56 7 $self->{'suggests'} ? :
218 633 67 unless $req->required_modules
223 18 45 if ($self->{'features'})
224 0 18 unless $self->{'features'}
229 162 18 unless $req->required_modules
242 45 5 unless $self->{'libs'}
245 50 5 unless -d $local_dir
249 9 6 unless -f $file
252 1 5 unless $relpath =~ /\.pm$/
257 1 4 if $dir eq "inc"
266 188 3 unless $self->{'possible_modules'}{$module} or $private_re and $module =~ /$private_re/
268 0 9 if ($self->{'verbose'})
278 0 7 unless eval { do { require Module::CoreList; "Module::CoreList"->VERSION("2.99") } }
281 1 6 if ($perl_version =~ /^v?5\.(0?[1-9][0-9]?)(?:\.([0-9]))?$/)
284 0 7 unless exists $Module::CoreList::version{$perl_version}
299 0 30 if exists $core_alias{$module}
300 22 8 if (Module::CoreList::is_core($module, undef, $perl_version) and not Module::CoreList::deprecated_in($module, undef, $perl_version))
303 0 22 unless exists $Module::CoreList::version{$perl_version}{$module}
305 1 21 unless $req->accepts_module($module, $core_version)
307 0 21 if ($self->{'verbose'})
321 1 7 if $perl_req
323 6 0 $perl_requirements->is_simple ? :
329 50 0 if (my $test_reqs = $self->{'prereqs'}->requirements_for("test", "requires"))
332 1 12 if exists $IsTestClassFamily{$module}
333 10 3 unless my $relpath = $self->{'possible_modules'}{$module}
334 0 3 unless my $context = delete $self->{'_test_pm'}{$relpath}
336 3 0 if ($self->{'recommends'} or $self->{'suggests'})
339 3 0 if ($self->{'suggests'})
343 2 48 if ($force)
344 0 2 unless $self->{'_test_pm'}
346 2 0 if ($self->{'recommends'} or $self->{'suggests'})
349 2 0 if ($self->{'suggests'})
362 38 12 unless $self->{'features'}
374 0 0 unless my $res = $self->{'index'}->search_packages({"package", $module})
376 0 0 if _dist_from_uri($res->{'uri'}) eq "perl"
392 0 0 if $module eq "perl"
393 0 0 unless my $uri = $self->_get_uri($module)
398 0 0 if @modules < 2
401 0 0 unless @modules_without_version
404 0 0 if (@modules > @modules_without_version)
412 0 0 if ($self->_get_uri($main_module)) { }
415 0 0 if $main_module eq $module
417 0 0 if ($self->{'verbose'})
429 0 0 unless $score{$a} <=> $score{$b}
431 0 0 if $topmost eq $module
433 0 0 if ($self->{'verbose'})
448 50 46 unless -f $file
453 0 0 unless $relpath =~ /\.(?:pl|PL|pm|cgi|psgi|t)$/ or dirname($relpath) =~ /\b(?:bin|scripts?)$/ or $self->{'develop'} and $relpath =~ /^(?:author)\b/
463 6 80 if ($self->{'ignore_re'})
464 3 3 if $file =~ /\b$self->{'ignore_re'}\b/
467 3 80 $self->{'optional_re'} && $file =~ /\b$self->{'optional_re'}\b/ ? :
481 22 61 if ($self->{'features'})
484 12 10 if (grep {$file =~ m[^$_(?:/|$)];} @{$$feature{"paths"};})
491 12 71 if ($relpath =~ m[(?:^|[\\/])t[\\/]]) { }
0 71 elsif ($relpath =~ m[(?:^|[\\/])(?:xt|inc|author)[\\/]]) { }
0 71 elsif ($relpath =~ m[(?:(?:^|[\\/])Makefile|^Build)\.PL$]) { }
0 71 elsif ($relpath =~ m[(?:^|[\\/])(?:.+)\.PL$]) { }
492 4 8 if ($relpath =~ /\.t$/) { }
7 1 elsif ($relpath =~ /\.pm$/) { }
507 78 5 if ($relpath =~ /\.pm$/)
525 65 10 if ($self->{'suggests'} or $self->{'recommends'})
530 65 10 if ($self->{'suggests'})