Branch Coverage

blib/lib/XS/Install.pm
Criterion Covered Total %
branch 143 380 37.6


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 341 if ($info->{'FILE'}) { }
254 341 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)
453 0 0 unless ($build_cmd)
455 0 0 if $info->{'GMAKE'} and $native_bsd_make
461 0 0 if exists $info->{'FILE'} and ref $info->{'FILE'} ne 'ARRAY'
464 0 0 unless $info->{'FILE'}
465 0 0 unless $f
466 0 0 if $f =~ /\.l?a$/
471 0 0 $info->{'FORCE_TRACKING'} ? :
474 0 0 if $clean_cmd
475 0 0 if ($static) { }
491 2 1 unless $pkg =~ s/^\s*-//
496 27 4 unless my $bin_share = $params->{'BIN_SHARE'}
504 29 6 unless @$pkgs
509 0 6 if $res->errmsg
520 27 4 unless my $bin_share = delete $params->{'BIN_SHARE'}
521 0 4 unless %$bin_share
522 0 4 if $params->{'_XSTEST'}
527 1 3 if scalar keys %$typemaps
530 0 4 if ($include == 1) { }
535 1 3 if scalar keys %$include
538 0 4 if $bin_share->{'LIBS'} and ref $bin_share->{'LIBS'} ne 'ARRAY'
540 0 4 if (my $list = $params->{'MODULE_INFO'}{'BIN_DEPENDENT'})
541 0 0 if @$list
544 4 0 if (my $vinfo = $params->{'MODULE_INFO'}{'BIN_DEPS'})
545 4 0 if %$vinfo
548 0 4 if $bin_share->{'PARSE_XS'} and ref $bin_share->{'PARSE_XS'} ne 'ARRAY'
550 0 4 unless %$bin_share
552 4 0 if (my $vbd = $params->{'MODULE_INFO'}{'VISIBLE_BIN_DEPS'})
560 0 4 if $params->{'CPLUS'}
572 0 31 unless $params->{'MODULE_INFO'}{'BIN_DEPS'}
573 0 31 unless @deps
582 0 31 unless $params->{'VERSION_FROM'}
584 0 31 if $module eq $THIS_MODULE
585 31 0 unless my $list = $params->{'MODULE_INFO'}{'BIN_DEPENDENT'}
586 0 0 unless @$list
588 0 0 unless $installed_version
589 0 0 unless my $new_version = 'MM'->parse_version($params->{'VERSION_FROM'})
590 0 0 if $installed_version eq $new_version
603 31 0 unless my $mode = $ENV{'SANITIZE'}
607 0 0 if ($mode =~ /a/i)
613 0 0 if ($mode =~ /u/i)
621 0 0 if (@preload and not $win32)
622 0 0 $win32 ? :
634 0 0 if $file eq $so
640 31 0 unless my $use_cpp = $params->{'CPLUS'}
643 0 0 if $cppv < 11
651 0 0 if $^V < v5.20
657 0 31 if $win32
664 0 31 if ($params->{'OPTIMIZE'} =~ /(^|\s)-g(\s|$)/)
678 0 31 if $str
683 0 31 if ($win32)
688 0 0 if $str
692 31 0 if index($params->{'LDDLFLAGS'} || '', $cfg_lddlflags) == -1
697 31 0 unless my $tp = $params->{'test'}
698 0 0 unless $tp->{'SRC'} or $tp->{'XS'} or $tp->{'CLIB'}
709 0 0 unless $mac
719 0 0 unless $params->{'MODULE_INFO'}{'BIN_DEPS'}
742 0 0 unless has_binary($mm_args) or $tp->{'CLIB'}
747 0 0 if $linux
761 0 0 if (my $prereq = $mm_args->{'PREREQ_PM'})
765 0 0 if $k eq $THIS_MODULE
783 31 0 unless my $clib = $params->{'test'}{'CLIB'}
784 0 0 unless ref $clib eq 'ARRAY'
785 0 0 unless @$clib
795 0 0 unless $cmake_target
812 0 0 if $cmake_params->{'OPTIONS'}
832 0 0 if $params->{'test'}
838 0 0 if $params->{'test'}
840 0 0 if ($bs)
858 31 0 unless $list and @$list
862 0 0 if (open my $fh, '<', $file)
864 0 0 if @lines
869 0 0 unless %hash
870 0 0 if (open my $fh, '>>', $file)
871 0 0 if defined $lastc and $lastc ne "\n" and $lastc ne "\r"
883 3 28 if (my $link = $params->{'LINK'})
889 1 30 unless has_binary($params)
900 31 0 unless $add_libs and @$add_libs
902 0 0 unless ref $libs eq 'ARRAY'
903 0 0 if ($libs and @$libs) { }
907 0 0 $l2 ? :
918 182 68 if (not $_[0]) { }
9 59 elsif (ref $_[0] ne 'ARRAY') { }
938 0 31 unless my $ddir = XS::Install::Payload::data_dir($module)
941 0 31 unless -f $pm
943 0 31 unless $version
947 84 2 $_[0]{'C'} && scalar @{$_[0]{'C'};} ? :
948 0 2 $_[0]{'OBJECT'} && scalar @{$_[0]{'OBJECT'};} ? :
949 0 2 $_[0]{'XS'} && scalar keys %{$_[0]{'XS'};} ? :
950 0 2 $_[0]{'MODULE_INFO'} && $_[0]{'MODULE_INFO'}{'STATIC_LIBS'} && scalar @{$_[0]{'MODULE_INFO'}{'STATIC_LIBS'};} ? :
958 0 62 unless $from
961 186 62 unless $tok =~ /^$qr$/
975 6 16 unless %$map
985 46 1 has_binary($_[0]) ? :
989 0 0 unless has_binary($params)
995 0 4 unless has_binary($params)
998 0 4 if defined &DynaLoader::mod2fname
1007 0 0 unless defined &{"${from}::$method";}
1014 53 78 unless $dir
1018 0 78 unless opendir my $dh, $dir
1020 156 159 if $entry =~ /^\./
1022 129 30 unless -d $path
1032 3 242 unless -f $file
1033 0 242 if $file =~ /\#/
1034 0 242 if $file =~ /~$/
1035 0 242 if $file =~ /,v$/
1036 0 242 if $file =~ /\.swp$/
1044 11 7 if (-f $source)
1045 2 9 if $dest =~ m([/\\]$)
1051 0 7 unless -d $source
1073 156 113 unless $_[1]
1075 37 76 $_[0] ? :
1082 31 31 unless defined $val and length $val
1083 31 0 if (not $s) { }
1119 0 0 unless exists $args{$i}
1129 0 0 if ($fix_bsd_make_j)
1138 0 0 if ($win32)
1143 0 0 unless ($gcc_compliant)
1151 0 0 unless $code
1156 0 0 if /\$\(LD\)\s/
1158 0 0 if $line =~ /$DLLTOOL/
1159 0 0 if ($line =~ /\$\(LD\)\s/)
1160 0 0 if $line ne $last_ld
1174 0 0 if $gcc_compliant
1182 0 0 unless ($INC{'ExtUtils/MakeMaker.pm'})
1199 0 0 unless defined $v_out
1205 0 0 if (open my $fh, '>', $tmpfile)
1213 0 0 unless $success
1218 0 0 if $v_out =~ /--enable-sjlj-exceptions/
1239 0 0 unless $pkg =~ /([^:]+)$/