Branch Coverage

blib/lib/App/Rakubrew/VersionHandling.pm
Criterion Covered Total %
branch 46 148 31.0


line true false branch
46 0 6 if (defined $ENV{$App::Rakubrew::VersionHandling::env_var} or defined $ENV{'PL6ENV_VERSION'}) { }
48 0 0 if (version_exists($version)) { }
69 0 10 if (-f $filepath)
71 0 0 if (version_exists($version)) { }
89 6 13 if $version eq "system"
91 0 13 unless $path
92 8 5 unless is_version_path_broken($path)
99 0 14 unless $path
101 9 45 if (-f catfile($path, "bin", $exec))
111 0 2 unless (version_exists($version))
116 0 2 if (is_version_broken($version))
124 0 0 if ($version) { }
135 1 6 unless (-e catfile($App::Rakubrew::VersionHandling::prefix, "CURRENT"))
147 1 1 unless $silent
153 0 6 $ignore eq 'shell' ? :
154 0 6 if defined $version
156 1 5 if (get_brew_mode() eq "shim")
159 0 1 $ignore eq 'local' ? :
160 0 1 if defined $version
169 0 1 if ($mode eq 'env') { }
1 0 elsif ($mode eq 'shim') { }
183 1 7 unless (-e catfile($App::Rakubrew::VersionHandling::prefix, "MODE"))
189 0 8 if ($mode ne "env" and $mode ne "shim")
190 0 0 unless $silent
191 0 0 unless $silent
200 0 0 if (get_brew_mode() eq "env")
208 0 3 unless defined $version
216 2 12 if (-f $version_file) { }
229 33 33 if -d catdir($cand, "bin")
238 4 14 if -f $version_path
241 18 0 if $version_path or $no_error
253 0 0 if @_ and not $_[0] =~ /^--/
256 0 0 unless (defined $ver)
261 0 0 if ($impl eq 'moar-blead') { }
0 0 elsif ($impl =~ /$combined_regex/) { }
0 0 elsif ($impl =~ /$version_regex/) { }
286 0 1 unless ($target)
288 0 0 if (whence($prog))
306 0 1 if ($version eq 'system') { }
0 1 elsif ($^O =~ /win32/i and (my_fileparse($prog))[2] eq '') { }
324 0 0 if @targets
344 0 0 if (check_prog_name_match($prog, $file))
353 0 0 if $suffix_a eq ".exe" and $suffix_b ne ".exe"
354 0 0 if $suffix_a ne ".exe" and $suffix_b eq ".exe"
355 0 0 if $suffix_a eq ".exe" and $suffix_b eq ".exe"
356 0 0 if $suffix_a eq ".bat" and $suffix_b ne ".bat"
357 0 0 if $suffix_a ne ".bat" and $suffix_b eq ".bat"
358 0 0 if $suffix_a eq ".bat" and $suffix_b eq ".bat"
359 0 0 if $suffix_a eq ".raku" and $suffix_b ne ".raku"
360 0 0 if $suffix_a ne ".raku" and $suffix_b eq ".raku"
361 0 0 if $suffix_a eq ".raku" and $suffix_b eq ".raku"
362 0 0 if $suffix_a eq ".p6" and $suffix_b ne ".p6"
363 0 0 if $suffix_a ne ".p6" and $suffix_b eq ".p6"
364 0 0 if $suffix_a eq ".p6" and $suffix_b eq ".p6"
365 0 0 if $suffix_a eq ".pl6" and $suffix_b ne ".pl6"
366 0 0 if $suffix_a ne ".pl6" and $suffix_b eq ".pl6"
367 0 0 if $suffix_a eq ".pl6" and $suffix_b eq ".pl6"
368 0 0 if $suffix_a eq ".pl" and $suffix_b ne ".pl"
369 0 0 if $suffix_a ne ".pl" and $suffix_b eq ".pl"
370 0 0 if $suffix_a eq ".pl" and $suffix_b eq ".pl"
371 0 0 if $suffix_a eq "" and $suffix_b ne ""
372 0 0 if $suffix_a ne "" and $suffix_b eq ""
373 0 0 if $suffix_a eq "" and $suffix_b eq ""
381 1 0 if (-e $path)
398 0 0 if $version eq "system"
399 0 0 if is_version_broken($version)
401 0 0 if (-f $path)
402 0 0 if ($pathmode) { }
420 0 3 if $no_error and not $version_path
429 0 1 if get_brew_mode() ne "shim"
433 1 1 if $version eq "system"
434 0 1 if is_version_broken($version)
443 2 0 if $entry =~ /^\./
451 0 1 if ($^O =~ /win32/i) { }