Branch Coverage

blib/lib/FFI/CheckLib.pm
Criterion Covered Total %
branch 75 108 69.4


line true false branch
36 1 0 unless File::Which::which("brew")
44 1 0 unless $port_path
51 1 5 if $pkg_managers eq "none"
58 6 2 if (my $lib_path = $supported_managers->{$pkg_manager}->())
125 754 276 defined $2 ? :
1030 1063 if $filename =~ /$regex/
137 58 152 if $A->[0] ne $B->[0]
142 0 10 unless defined $A->[$i] or defined $B->[$i]
143 10 246 unless defined $A->[$i]
144 128 118 unless defined $B->[$i]
145 14 104 if $A->[$i] != $B->[$i]
163 0 82 unless defined $args{'lib'}
170 20 390 if ref $args{$arg} eq "ARRAY"
171 97 293 if (defined $args{$arg}) { }
181 0 82 if (defined $args{'systempath'} and not ref $args{'systempath'})
187 2 80 if $recursive
189 0 82 if (defined $args{'systempath'}) { }
206 2 80 if ($ENV{'FFI_CHECKLIB_PATH'}) { }
214 0 0 unless &any(sub { $_ eq $extra_path; } , @path)
229 1 4 unless ($alien =~ /^([A-Za-z_][A-Za-z_0-9]*)(::[A-Za-z_][A-Za-z_0-9]*)*$/)
233 3 1 unless (eval { do { $alien->can("dynamic_libs") } })
240 1 2 if $@
242 1 1 unless (eval { do { $alien->can("dynamic_libs") } })
252 0 169 if ref $path ne "ARRAY" and not -d $path
259 180 782 if $any or $missing{$_->[0]}
267 2 167 ref $path eq 'ARRAY' ? :
275 0 0 if ($try_ld_on_text and $args{'try_linker_script'})
279 0 0 -B $_->[1] ? :
282 0 0 $output =~ /\((.*?lib.*\.so.*?)\)/ ? :
292 67 113 unless $any or $missing{$lib->[0]}
296 45 3 unless &$verify(@$lib)
301 12 56 if (%symbols)
307 21 6 DynaLoader::dl_find_symbol($dll, $symbol) ? :
21 6 if (DynaLoader::dl_find_symbol($dll, $symbol) ? 1 : 0)
317 65 3 unless ($any)
331 17 63 if (%missing) { }
6 57 elsif (%symbols) { }
334 0 17 if (@missing > 1) { }
342 0 6 if (@missing > 1) { }
348 6 74 if %symbols
349 27 47 unless wantarray
356 0 6 unless -d $dir
367 3 3 unless check_lib(@_)
373 0 0 unless (check_lib(@_))
384 0 0 unless (@libs)
389 0 0 unless @libs
390 0 0 wantarray ? :
397 0 0 unless (@libs)
401 0 0 unless @libs
402 0 0 wantarray ? :
408 6 6 find_lib(@_) ? :
415 0 1 if $name eq "*"
425 1 1 $name eq '*' ? :
439 2 9 unless (DynaLoader::dl_find_symbol($dll, $symbol))