Branch Coverage

lib/Perl/PrereqScanner/NotQuiteLite/App.pm
Criterion Covered Total %
branch 119 202 58.9


line true false branch
29 218 0 unless $key =~ /\-/
35 0 43 unless defined $opts{'parsers'}
36 0 43 unless defined $opts{'recommends'}
37 0 43 unless defined $opts{'suggests'}
40 15 28 if $opts{'save_cpanfile'}
42 12 31 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 41 if ($opts{'ignore'} and ref $opts{'ignore'} eq "ARRAY")
74 1 42 if ($opts{'private'} and ref $opts{'private'} eq "ARRAY")
83 2 41 if ($opts{'optional'} and ref $opts{'optional'} eq "ARRAY")
92 3 40 if ($opts{'optional_re'})
96 0 43 if (my $index_name = delete $opts{'use_index'})
98 0 0 if (eval "require $index_package; 1")
103 2 41 if ($opts{'scan_also'})
113 43 0 unless (@args)
121 0 43 if ($self->{'blib'} and -d 'File::Spec'->catdir($self->{'base_dir'}, 'blib')) { }
130 41 2 unless $self->{'libs'}
133 0 43 if $self->{'develop'}
136 0 43 if ($self->{'verbose'})
142 36 301 'File::Spec'->file_name_is_absolute($path) ? :
143 33 282 -f $item ? :
22 315 -d $item ? :
153 7 36 if ($self->{'exclude_core'})
157 0 43 if ($self->{'index'})
163 15 28 if ($self->{'print'} or $self->{'cpanfile'})
164 0 15 if ($self->{'json'}) { }
15 0 elsif ($self->{'cpanfile'}) { }
0 0 elsif ($self->{'print'}) { }
166 0 0 unless eval { do { require JSON::PP } }
169 0 15 unless eval { do { require Perl::PrereqScanner::NotQuiteLite::Util::CPANfile } }
173 0 15 if $self->{'index'}
175 15 0 if ($self->{'save_cpanfile'}) { }
0 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 56 if $self->{'develop'}
213 0 0 $self->{'recommends'} ? :
56 0 $self->{'suggests'} ? :
218 613 59 unless $req->required_modules
223 18 38 if ($self->{'features'})
224 0 18 unless $self->{'features'}
229 162 18 unless $req->required_modules
242 41 2 unless $self->{'libs'}
245 43 2 unless -d $local_dir
249 4 2 unless -f $file
252 0 2 unless $relpath =~ /\.pm$/
257 1 1 if $dir eq "inc"
266 156 3 unless $self->{'possible_modules'}{$module} or $private_re and $module =~ /$private_re/
268 0 8 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 43 0 if (my $test_reqs = $self->{'prereqs'}->requirements_for("test", "requires"))
332 1 9 if exists $IsTestClassFamily{$module}
333 7 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 41 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 31 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 45 42 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 69 if ($self->{'ignore_re'})
464 3 3 if $file =~ /\b$self->{'ignore_re'}\b/
467 3 69 $self->{'optional_re'} && $file =~ /\b$self->{'optional_re'}\b/ ? :
481 22 50 if ($self->{'features'})
484 12 10 if (grep {$file =~ m[^$_(?:/|$)];} @{$$feature{"paths"};})
491 10 62 if ($relpath =~ m[(?:^|[\\/])t[\\/]]) { }
0 62 elsif ($relpath =~ m[(?:^|[\\/])(?:xt|inc|author)[\\/]]) { }
0 62 elsif ($relpath =~ m[(?:(?:^|[\\/])Makefile|^Build)\.PL$]) { }
0 62 elsif ($relpath =~ m[(?:^|[\\/])(?:.+)\.PL$]) { }
492 3 7 if ($relpath =~ /\.t$/) { }
6 1 elsif ($relpath =~ /\.pm$/) { }
507 68 4 if ($relpath =~ /\.pm$/)
525 65 0 if ($self->{'suggests'} or $self->{'recommends'})
530 65 0 if ($self->{'suggests'})