Branch Coverage

blib/lib/Imager/Probe.pm
Criterion Covered Total %
branch 0 240 0.0


line true false branch
21 0 0 if ($req->{'code'})
24 0 0 if (not $result and $req->{'pkg'})
27 0 0 if (not $result and $req->{'inccheck'} and $req->{'libcheck'} || $req->{'libbase'})
32 0 0 if ($result and $req->{'testcode'})
36 0 0 if (not $result and $req->{'alternatives'})
42 0 0 if $req->{'verbose'}
45 0 0 if exists $alt->{$key}
49 0 0 if ($result and $req->{'testcode'})
54 0 0 if $result
60 0 0 if (not $result and $req->{'testcode'})
63 0 0 unless $result
68 0 0 unless $result
84 0 0 if ($arg =~ /^\U\Q$arg\E=(.*)$\E/)
94 0 0 ref $code eq 'ARRAY' ? :
98 0 0 if $result = &$probe($req)
109 0 0 if ($^O eq 'MSWin32') { }
0 0 elsif ($^O eq 'cygwin') { }
118 0 0 if -x "File::Spec"->catfile($dir, "$name$suffix")
132 0 0 if $ENV{'PKG_CONFIG_PATH'}
135 0 0 if $req->{'verbose'}
137 0 0 unless is_exe("pkg-config")
138 0 0 $^O eq 'MSWin32' ? :
142 0 0 unless (system "pkg-config $pkg --exists $redir")
145 0 0 unless my $cflags = `pkg-config $pkg --cflags` and not $?
148 0 0 unless my $lflags = `pkg-config $pkg --libs` and not $?
157 0 0 if $req->{'verbose'}
164 0 0 if (not grep(/^-L/, split(' ', $lflags, 0)) and $^O ne "MSWin32")
168 0 0 if $req->{'verbose'}
171 0 0 unless ($ld_run_path)
198 0 0 if (_is_msvc()) { }
209 0 0 if (_is_msvc()) { }
220 0 0 $opt =~ /\s/ ? :
228 0 0 if ($req->{'libcheck'}) { }
0 0 elsif ($req->{'libbase'}) { }
229 0 0 if (ref $req->{'libcheck'} eq 'ARRAY') { }
237 0 0 ref $req->{'libbase'} ? :
245 0 0 unless -e "File::Spec"->catfile($_[0], "$basename$aext")
252 0 0 if $req->{'verbose'}
259 0 0 if $req->{'verbose'}
262 0 0 if $req->{'verbose'}
263 0 0 if (&$libcheck($path))
264 0 0 if $req->{'verbose'}
275 0 0 if $req->{'verbose'}
277 0 0 if $req->{'verbose'}
278 0 0 if (&$inccheck($path))
279 0 0 if $req->{'verbose'}
286 0 0 if ($req->{'altname'})
289 0 0 $found_incpath ? :
0 0 @found_libpath == @libcheck ? :
292 0 0 unless @found_libpath == @libcheck and $found_incpath
296 0 0 if ($req->{'libopts'}) { }
0 0 elsif (@libbase) { }
321 0 0 if ($req->{'libopts'}) { }
0 0 elsif (defined $req->{'libbase'}) { }
329 0 0 ref $req->{'libbase'} ? :
0 0 $req->{'libbase'} ? :
332 0 0 if (defined $lopts) { }
343 0 0 if $req->{'verbose'}
352 0 0 if $req->{'verbose'}
357 0 0 if ($ld_run_path)
359 0 0 if $req->{'verbose'}
361 0 0 if ($Imager::Probe::Config{'lddlflags'} =~ /([^ ]*-(?:rpath|R)[,=]?)([^ ]+)/ and -d $2)
379 0 0 unless ($good)
392 0 0 if (my $hdrs = $args{'header'})
393 0 0 unless ref $hdrs
396 0 0 if $args{'prologue'}
397 0 0 unless $args{'function'}
422 0 0 if (-e "$path/$lib.$so" or -e "$path/$lib$libext")
435 0 0 if $req->{'verbose'} and defined $ENV{'IM_LIBPATH'}
437 0 0 if $req->{'verbose'} and defined $ENV{'LIB'} and $^O eq "MSWin32"
440 0 0 ref $lp ? :
0 0 if $req->{'verbose'} and defined $lp
451 0 0 $^O eq 'MSWin32' ? :
0 0 $^O eq 'cygwin' ? :
462 0 0 unless $Imager::Probe::Config{'gccversion'}
464 0 0 unless my($base_version) = $Imager::Probe::Config{'gccversion'} =~ /^([0-9]+)/
467 0 0 unless $base_version >= 4
472 0 0 unless my($lib_line) = grep(/^libraries:/, `$Imager::Probe::Config{'cc'} -print-search-dirs`)
481 0 0 defined $_ ? :
490 0 0 if $req->{'verbose'} and defined $ENV{'IM_INCPATH'}
492 0 0 if $req->{'verbose'} and defined $ENV{'INCLUDE'} and $^O eq "MSWin32"
495 0 0 ref $ip ? :
0 0 if $req->{'verbose'} and defined $req->{'incpath'}
506 0 0 $^O eq 'MSWin32' ? :
0 0 $^O eq 'cygwin' ? :
514 0 0 if ($req->{'incsuffix'})
523 0 0 unless $Imager::Probe::Config{'gccversion'}
525 0 0 unless my($base_version) = $Imager::Probe::Config{'gccversion'} =~ /^([0-9]+)/
528 0 0 unless $base_version >= 4
557 0 0 if $line =~ /^#include /
558 0 0 unless $line =~ s/^\s+//
567 0 0 $tmp =~ s/\blib$/include/ ? :
577 0 0 if (ref $_) { }
580 0 0 unless $path
598 0 0 if ($path =~ m(^~[/\\]))
599 0 0 unless defined $home
600 0 0 if (not defined $home and $^O eq "MSWin32" and defined $ENV{'HOMEDRIVE'} and defined $ENV{'HOMEPATH'})
604 0 0 unless (defined $home)
607 0 0 unless defined $home
619 0 0 unless $state{'start_dir'} = Cwd::getcwd()
623 0 0 unless $state{'tmpdir'} = "File::Temp"->newdir("CLEANUP", !$state{'keep'})
632 0 0 $std > 80 ? :
665 0 0 unless my $name = $args{'name'}
668 0 0 unless chdir $state->{'tmpdir'}
676 0 0 if (open my $tmpc, ">", "$base.c")
685 0 0 unless $args{'ccflags_only'}
686 0 0 if $args{'ccflags'}
691 0 0 if ($std and $stdflag)
697 0 0 $verbose ? :
701 0 0 if ($args{'nolink'}) { }
711 0 0 if $verbose
715 0 0 if ($ok and not $args{'nolink'} and not -x $base_out)
719 0 0 if ($ok and $args{'run'})
723 0 0 unless chdir $state->{'start_dir'}
728 0 0 if $Imager::Probe::Config{'run'} and -e $Imager::Probe::Config{'run'}
729 0 0 if $verbose
730 0 0 if (system(@run) == 0) { }
732 0 0 if $verbose
737 0 0 if $verbose
750 0 0 unless chdir $state->{'start_dir'}