Branch Coverage

blib/lib/XS/Install.pm
Criterion Covered Total %
branch 143 382 37.4


line true false branch
51 0 0 if ($test_params)
58 0 31 ref $_[0] eq 'HASH' ? :
60 0 31 unless $params->{'NAME'}
79 0 31 if ($params->{'_XSTEST'}) { }
84 0 31 if $cmake_params
94 11 20 if wantarray
102 0 31 if ($postamble)
104 0 0 if (not $ref) { }
0 0 elsif ($ref eq 'HASH') { }
0 0 elsif ($ref ne 'ARRAY') { }
114 0 31 if (my $comp = $ENV{'COMPILER'} || $ENV{'CC'})
118 31 0 if (my $opt = $ENV{'OPTIMIZE'})
140 0 31 if delete $params->{'UNIQUE_LIBNAME'}
142 0 31 if $params->{'BIN_SHARE'} and not ref $params->{'BIN_SHARE'}
143 0 4 if $params->{'BIN_SHARE'} and $params->{'LINK'}
148 0 31 unless my $module = $params->{'NAME'}
150 1 30 if (my $file = delete $params->{'ALL_FROM'})
151 1 0 unless $params->{'VERSION'}
152 1 0 unless $params->{'ABSTRACT'}
158 31 0 unless $params->{'VERSION'}
159 0 30 -f $pod ? :
31 0 unless $params->{'ABSTRACT'}
175 31 0 unless ($params->{'NAME'} eq $THIS_MODULE)
183 0 31 if $params->{'PM'}
191 31 31 unless -d $dir
204 21 10 unless my $payload = delete $params->{'PAYLOAD'}
213 31 0 unless $params->{'NAME'} eq $THIS_MODULE
225 0 31 if $module =~ s/^-//
227 0 31 if $seen->{$module}++
230 0 31 unless $installed_version
235 31 0 unless $stop_sharing
237 0 31 unless my $info = XS::Install::Payload::binary_module_info($module)
244 0 31 unless $module =~ /([^:]+)$/
248 0 248 if ($info->{'FILE'}) { }
254 248 0 unless -f $lib_path
259 31 0 if ($info->{'INCLUDE'})
273 0 31 if (my $passthrough = $info->{'PASSTHROUGH'})
277 31 0 if (my $typemaps = $info->{'TYPEMAPS'})
286 0 0 if $info->{'CPLUS'} and !$params->{'CPLUS'} || $params->{'CPLUS'} < $info->{'CPLUS'}
288 31 0 if (my $parsexs = $info->{'PARSE_XS'})
296 0 31 unless @$list
305 0 25 $params->{'_XSTEST'} ? :
306 0 28 $params->{'_XSTEST'} ? :
310 29 2 if (ref $params->{'XS'} ne "HASH")
319 76 1 unless ($cfile)
320 0 76 $params->{'CPLUS'} ? :
321 76 0 if ($xsfile =~ /\.xs$/) { }
330 1 76 unless ($suffix)
363 0 179 if $deps and @$deps
370 0 0 unless $deps and @$deps
375 77 0 unless $deps and @$deps
393 0 0 unless -d $bdir
394 0 0 unless -d $pdir
395 0 0 unless -d "$pdir/$prefix"
398 0 0 if $info->{'GMAKE'} and $native_bsd_make
437 31 0 unless my $clib = delete $params->{'CLIB'}
438 0 0 unless ref $clib eq "ARRAY"
439 0 0 unless @$clib
441 0 0 $mac ? :
442 0 0 $mac ? :
446 0 0 if ($cmake_target)
454 0 0 unless ($build_cmd or $build_dep)
456 0 0 if $info->{'GMAKE'} and $native_bsd_make
462 0 0 if exists $info->{'FILE'} and ref $info->{'FILE'} ne "ARRAY"
465 0 0 unless $info->{'FILE'}
466 0 0 unless $f
467 0 0 if $f =~ /\.l?a$/
472 0 0 $info->{'FORCE_TRACKING'} ? :
474 0 0 if ($build_dep) { }
480 0 0 if $clean_cmd
482 0 0 if ($static) { }
498 2 1 unless $pkg =~ s/^\s*-//
503 27 4 unless my $bin_share = $params->{'BIN_SHARE'}
511 29 6 unless @$pkgs
516 0 6 if $res->errmsg
527 27 4 unless my $bin_share = delete $params->{'BIN_SHARE'}
528 0 4 unless %$bin_share
529 0 4 if $params->{'_XSTEST'}
534 1 3 if scalar keys %$typemaps
537 0 4 if ($include == 1) { }
542 1 3 if scalar keys %$include
545 0 4 if $bin_share->{'LIBS'} and ref $bin_share->{'LIBS'} ne "ARRAY"
547 0 4 if (my $list = $params->{'MODULE_INFO'}{'BIN_DEPENDENT'})
548 0 0 if @$list
551 4 0 if (my $vinfo = $params->{'MODULE_INFO'}{'BIN_DEPS'})
552 4 0 if %$vinfo
555 0 4 if $bin_share->{'PARSE_XS'} and ref $bin_share->{'PARSE_XS'} ne "ARRAY"
557 0 4 unless %$bin_share
559 4 0 if (my $vbd = $params->{'MODULE_INFO'}{'VISIBLE_BIN_DEPS'})
567 0 4 if $params->{'CPLUS'}
579 0 31 unless $params->{'MODULE_INFO'}{'BIN_DEPS'}
580 0 31 unless @deps
589 0 31 unless $params->{'VERSION_FROM'}
591 0 31 if $module eq $THIS_MODULE
592 31 0 unless my $list = $params->{'MODULE_INFO'}{'BIN_DEPENDENT'}
593 0 0 unless @$list
595 0 0 unless $installed_version
596 0 0 unless my $new_version = "MM"->parse_version($params->{'VERSION_FROM'})
597 0 0 if $installed_version eq $new_version
610 31 0 unless my $mode = $ENV{'SANITIZE'}
614 0 0 if ($mode =~ /a/i)
620 0 0 if ($mode =~ /u/i)
628 0 0 if (@preload and not $win32)
629 0 0 $win32 ? :
641 0 0 if $file eq $so
647 31 0 unless my $use_cpp = $params->{'CPLUS'}
650 0 0 if $cppv < 11
658 0 0 if $^V < v5.20
664 0 31 if $win32
671 0 31 if ($params->{'OPTIMIZE'} =~ /(^|\s)-g(\s|$)/)
685 0 31 if $str
690 0 31 if ($win32)
695 0 0 if $str
699 31 0 if index($params->{'LDDLFLAGS'} || '', $cfg_lddlflags) == -1
704 31 0 unless my $tp = $params->{'test'}
705 0 0 unless $tp->{'SRC'} or $tp->{'XS'} or $tp->{'CLIB'}
716 0 0 unless $mac
726 0 0 unless $params->{'MODULE_INFO'}{'BIN_DEPS'}
749 0 0 unless has_binary($mm_args) or $tp->{'CLIB'}
754 0 0 if $linux
768 0 0 if (my $prereq = $mm_args->{'PREREQ_PM'})
772 0 0 if $k eq $THIS_MODULE
790 31 0 unless my $clib = $params->{'test'}{'CLIB'}
791 0 0 unless ref $clib eq "ARRAY"
792 0 0 unless @$clib
802 0 0 unless $cmake_target
819 0 0 if $cmake_params->{'OPTIONS'}
839 0 0 if $params->{'test'}
845 0 0 if $params->{'test'}
847 0 0 if ($bs)
865 31 0 unless $list and @$list
869 0 0 if (open my $fh, "<", $file)
871 0 0 if @lines
876 0 0 unless %hash
877 0 0 if (open my $fh, ">>", $file)
878 0 0 if defined $lastc and $lastc ne "\n" and $lastc ne "\r"
890 3 28 if (my $link = $params->{'LINK'})
896 1 30 unless has_binary($params)
907 31 0 unless $add_libs and @$add_libs
909 0 0 unless ref $libs eq "ARRAY"
910 0 0 if ($libs and @$libs) { }
914 0 0 $l2 ? :
925 182 68 if (not $_[0]) { }
9 59 elsif (ref $_[0] ne 'ARRAY') { }
945 0 31 unless my $ddir = XS::Install::Payload::data_dir($module)
948 0 31 unless -f $pm
950 0 31 unless $version
954 84 2 $_[0]{'C'} && scalar @{$_[0]{'C'};} ? :
955 0 2 $_[0]{'OBJECT'} && scalar @{$_[0]{'OBJECT'};} ? :
956 0 2 $_[0]{'XS'} && scalar keys %{$_[0]{'XS'};} ? :
957 0 2 $_[0]{'MODULE_INFO'} && $_[0]{'MODULE_INFO'}{'STATIC_LIBS'} && scalar @{$_[0]{'MODULE_INFO'}{'STATIC_LIBS'};} ? :
965 0 62 unless $from
968 186 62 unless $tok =~ /^$qr$/
982 6 16 unless %$map
992 46 1 has_binary($_[0]) ? :
996 0 0 unless has_binary($params)
1002 0 4 unless has_binary($params)
1005 0 4 if defined &DynaLoader::mod2fname
1014 0 0 unless defined &{"${from}::$method";}
1021 53 78 unless $dir
1025 0 78 unless opendir my $dh, $dir
1027 156 159 if $entry =~ /^\./
1029 129 30 unless -d $path
1039 3 242 unless -f $file
1040 0 242 if $file =~ /\#/
1041 0 242 if $file =~ /~$/
1042 0 242 if $file =~ /,v$/
1043 0 242 if $file =~ /\.swp$/
1051 11 7 if (-f $source)
1052 2 9 if $dest =~ m([/\\]$)
1058 0 7 unless -d $source
1080 156 113 unless $_[1]
1082 37 76 $_[0] ? :
1089 31 31 unless defined $val and length $val
1090 31 0 if (not $s) { }
1126 0 0 unless exists $args{$i}
1136 0 0 if ($fix_bsd_make_j)
1145 0 0 if ($win32)
1150 0 0 unless ($gcc_compliant)
1158 0 0 unless $code
1163 0 0 if /\$\(LD\)\s/
1165 0 0 if $line =~ /$DLLTOOL/
1166 0 0 if ($line =~ /\$\(LD\)\s/)
1167 0 0 if $line ne $last_ld
1181 0 0 if $gcc_compliant
1189 0 0 unless ($INC{'ExtUtils/MakeMaker.pm'})
1206 0 0 unless defined $v_out
1212 0 0 if (open my $fh, ">", $tmpfile)
1220 0 0 unless $success
1225 0 0 if $v_out =~ /--enable-sjlj-exceptions/
1246 0 0 unless $pkg =~ /([^:]+)$/