Branch Coverage

blib/lib/ExtUtils/Install.pm
Criterion Covered Total %
branch 117 274 42.7


line true false branch
89 0 3 $^O eq 'VMS' ? :
90 0 3 $^O eq 'MSWin32' ? :
91 0 3 $^O eq 'cygwin' ? :
92 0 3 $^O eq 'MSWin32' || $^O eq 'cygwin' ? :
116 0 0 unless $warned{$msg}++
137 14 20 if (-f $_[1] and -s _ == -s $_[0])
148 13 2 if (chmod $mode, $item) { }
149 0 13 if $verbose > 1
152 0 2 if -e $item
187 0 0 ref $target ? :
194 0 0 unless defined $Has_Win32API_File
196 0 0 unless ($Has_Win32API_File)
204 0 0 if ($moan) { }
208 0 0 unless ref $target
212 0 0 unless ref $target
214 0 0 if (Win32API::File::MoveFileEx($file, $target, $opts)) { }
215 0 0 ref $target ? :
223 0 0 if ($moan) { }
271 0 7 if ($^O =~ /^(dos|os2|MSWin32|VMS)$/)
276 7 0 if $unlink_count > 0
289 0 0 if (rename $file, $tmp) { }
0 0 elsif ($installing) { }
320 0 19 if ($ENV{'EU_INSTALL_IGNORE_SKIP'})
321 0 0 if $verbose > 2
325 19 0 unless (defined $skip)
326 0 19 if $verbose > 2
329 19 19 unless $file
330 0 19 if $verbose > 2
332 0 19 if (-e $file)
338 0 19 if ($skip and not ref $skip) { }
0 19 elsif (UNIVERSAL::isa($skip, 'ARRAY')) { }
0 19 elsif ($verbose) { }
339 0 0 if $verbose
341 0 0 if (open my $fh, $skip) { }
345 0 0 if /^\s*(?:#|$)/
346 0 0 if $verbose > 3
355 0 0 if $verbose > 2
358 0 0 if $verbose > 1
362 0 19 if $verbose > 3
377 3 23 unless (defined $has_posix)
381 26 0 if ($has_posix) { }
411 0 26 unless defined $dir and length $dir
415 25 1 unless 'File::Spec'->file_name_is_absolute($dir)
426 0 50 if defined $vol and length $vol
429 0 50 if $dir eq $path
430 24 26 unless (-e $dir)
434 26 0 if (_have_write_access($dir)) { }
463 0 0 if ($verbose and $verbose > 1 and not -d $dir)
467 28 6 unless ($dry_run)
469 0 28 unless eval { do { @created = File::Path::mkpath($dir, $show, $mode); 1 } }
475 10 18 if (@created)
480 0 24 if (not $can) { }
0 48 elsif ($show and $dry_run) { }
481 0 0 $root ? :
486 0 0 if ($dry_run) { }
511 0 15 if ($verbose and $verbose > 1)
514 13 2 if (not $dry_run)
515 0 13 unless File::Copy::copy($from, $to)
535 0 76 if (defined wantarray)
538 0 76 unless chdir $dir
661 12 7 if (@_ == 1 and eval { do { 1 + @$from_to } })
664 0 12 unless $from_to = $opts{'from_to'}
680 19 0 unless defined $always_copy
694 14 5 if -f $tmpfile
704 0 19 $^O eq 'MacOS' ? :
719 0 16 if ($source eq $blib_lib and exists $from_to{$blib_arch} and &directory_not_empty($blib_arch))
727 0 19 unless -d $source
734 57 19 unless -f _
737 0 19 if $origfile eq '.exists'
744 0 0 if ($sourcefile =~ /$pat/)
745 0 0 if $verbose > 1
756 7 12 unless -w $targetfile
779 12 7 if ($diff) { }
781 5 7 if (-f $targetfile) { }
2 5 elsif (not -d $targetdir) { }
782 0 5 if $verbose > 1
783 5 0 unless $dry_run
794 0 12 if $verbose > 1
795 12 0 unless $dry_run > 1
798 0 12 $mode & 73 ? :
799 0 12 if $realtarget ne $targetfile
804 0 12 unless (eval { do { if (-f $targetfile) { print "_unlink_or_rename($targetfile)\n" if $verbose > 1; $targetfile = _unlink_or_rename($targetfile, 'tryhard', 'install') unless $dry_run; } elsif (not -d $targetdir) { _mkpath($targetdir, 0, 493, $verbose, $dry_run); } ; print "Installing $targetfile\n"; _copy($sourcefile, $targetfile, $verbose, $dry_run); print "utime($atime,$mtime,$targetfile)\n" if $verbose > 1; utime $atime, $mtime + 0, $targetfile unless $dry_run > 1; $mode = 292 | ($mode & 73 ? 73 : 0); $mode = $mode | 146 if $realtarget ne $targetfile; &_chmod($mode, $targetfile, $verbose); $result->{'install'}{$targetfile} = $sourcefile; 1 } })
810 0 7 if $verbose
813 8 11 if ($uninstall_shadows)
814 0 8 $realtarget ne $targetfile ? :
824 17 0 if ($pack{'write'})
827 0 17 if $verbose
828 15 2 unless $dry_run
848 0 17 if ($MUST_REBOOT) { }
0 17 elsif (defined $MUST_REBOOT & $verbose) { }
875 0 34 if (defined $INSTALL_ROOT) { }
884 0 36 if (defined $INSTALL_ROOT) { }
925 0 0 if $_ eq '.exists'
926 0 0 if (-f $_)
958 0 0 unless @_ < 2
959 0 0 @_ ? :
960 0 0 unless defined $FULLEXT
969 0 0 if ($ExtUtils::Install::Config{'installhtmldir'})
985 0 0 &directory_not_empty($INST_ARCHLIB) ? :
1010 0 0 unless -f $fil
1018 0 0 if $verbose
1019 0 0 unless $dry_run
1021 0 0 if $verbose
1022 0 0 unless $dry_run
1053 8 0 defined $ENV{'PERL5LIB'} ? :
1066 2 62 if $canonpath eq $Curdir
1067 18 44 if $seen_dir{$canonpath}++
1069 34 10 unless -f $targetfile
1076 0 10 if $diff and $verbose > 1
1078 4 6 if (not $diff or $targetfile eq $ignore)
1082 0 6 if ($dry_run) { }
1084 0 0 if ($verbose)
1094 0 6 if $verbose
1096 0 2 if $ExtUtils::Install::Testing and ucase('File::Spec'->canonpath($ExtUtils::Install::Testing)) eq ucase($targetfile)
1102 4 2 unless (eval { do { die 'Fake die for testing' if $ExtUtils::Install::Testing and ucase('File::Spec'->canonpath($ExtUtils::Install::Testing)) eq ucase($targetfile); forceunlink($targetfile, 'tryhard'); $results->{'uninstall'}{$targetfile} = $filepath; 1 } })
1104 2 2 if ($seen_ours) { }
1127 0 0 unless open CMD, "|$cmd >$dest"
1128 0 0 unless open SRC, $src
1135 0 0 unless close CMD
1164 5 1 if defined $autodir
1166 0 3 if (-f $to and -s $from == -s $to and -M $to < -M $from)
1167 0 0 unless $INSTALL_QUIET
1179 3 3 unless ($need_filtering or _compare($from, $to))
1180 3 0 unless $INSTALL_QUIET
1183 0 3 if (-f $to) { }
1188 3 0 unless ($dirs{$dirname}++)
1192 0 3 if ($need_filtering) { }
1197 3 0 unless $INSTALL_QUIET
1201 0 3 $mode & 73 ? :
1202 0 3 unless $from =~ /\.pm$/
1203 3 0 if defined $autodir
1222 0 3 if defined *AutoSplit::IN{'IO'}
1238 0 0 unless (defined $INSTALL_ROOT)
1242 0 0 @{$self->{$file};} > 1 ? :
1249 0 0 $i > 1 ? :
1251 0 0 _invokant() eq 'ExtUtils::MakeMaker' ? :
1279 0 0 if ($top =~ /^Build/i or exists $INC{'Module/Build.pm'}) { }