Branch Coverage

blib/lib/ExtUtils/Install.pm
Criterion Covered Total %
branch 117 272 43.0


line true false branch
93 0 3 $^O eq 'VMS' ? :
94 0 3 $^O eq 'MSWin32' ? :
95 0 3 $^O eq 'cygwin' ? :
96 0 3 $^O eq 'MSWin32' || $^O eq 'cygwin' ? :
120 0 0 unless $warned{$msg}++
148 13 2 if (chmod $mode, $item) { }
149 0 13 if $verbose > 1
152 0 2 if -e $item
189 0 0 ref $target ? :
196 0 0 unless defined $Has_Win32API_File
198 0 0 unless ($Has_Win32API_File)
206 0 0 if ($moan) { }
210 0 0 unless ref $target
214 0 0 unless ref $target
216 0 0 if (Win32API::File::MoveFileEx($file, $target, $opts)) { }
217 0 0 ref $target ? :
225 0 0 if ($moan) { }
276 0 7 if ($^O =~ /^(dos|os2|MSWin32|VMS)$/)
281 7 0 if $unlink_count > 0
294 0 0 if (rename $file, $tmp) { }
0 0 elsif ($installing) { }
334 0 19 if ($ENV{'EU_INSTALL_IGNORE_SKIP'})
335 0 0 if $verbose > 2
339 19 0 unless (defined $skip)
340 0 19 if $verbose > 2
343 19 19 unless $file
344 0 19 if $verbose > 2
346 0 19 if (-e $file)
352 0 19 if ($skip and not ref $skip) { }
0 19 elsif (UNIVERSAL::isa($skip, 'ARRAY')) { }
0 19 elsif ($verbose) { }
353 0 0 if $verbose
355 0 0 if (open my $fh, $skip) { }
359 0 0 if /^\s*(?:#|$)/
360 0 0 if $verbose > 3
369 0 0 if $verbose > 2
372 0 0 if $verbose > 1
376 0 19 if $verbose > 3
393 3 33 unless (defined $has_posix)
397 36 0 if ($has_posix) { }
430 0 36 unless defined $dir and length $dir
434 35 1 unless 'File::Spec'->file_name_is_absolute($dir)
445 0 60 if defined $vol and length $vol
448 0 60 if $dir eq $path
449 24 36 unless (-e $dir)
453 36 0 if (_have_write_access($dir)) { }
484 0 0 if ($verbose and $verbose > 1 and not -d $dir)
488 28 6 unless ($dry_run)
489 0 28 unless (eval { do { File::Path::mkpath($dir, $show, $mode); 1 } })
495 0 34 if (not $can) { }
0 68 elsif ($show and $dry_run) { }
496 0 0 $root ? :
501 0 0 if ($dry_run) { }
529 0 15 if ($verbose and $verbose > 1)
532 13 2 if (not $dry_run)
533 0 13 unless File::Copy::copy($from, $to)
553 19 57 if (defined wantarray)
556 0 76 unless chdir $dir
685 12 7 if (@_ == 1 and eval { do { 1 + @$from_to } })
688 0 12 unless $from_to = $opts{'from_to'}
704 19 0 unless defined $always_copy
718 14 5 if -f $tmpfile
728 0 19 $^O eq 'MacOS' ? :
743 0 16 if ($source eq $blib_lib and exists $from_to{$blib_arch} and &directory_not_empty($blib_arch))
751 0 19 unless -d $source
758 57 19 unless -f _
761 0 19 if $origfile eq '.exists'
768 0 0 if ($sourcefile =~ /$pat/)
769 0 0 if $verbose > 1
780 12 7 if ($always_copy or not -f $targetfile or -s $targetfile != $size) { }
786 7 12 unless -w $targetfile
809 12 7 if ($diff) { }
811 5 7 if (-f $targetfile) { }
2 5 elsif (not -d $targetdir) { }
812 0 5 if $verbose > 1
813 5 0 unless $dry_run
824 0 12 if $verbose > 1
825 12 0 unless $dry_run > 1
828 0 12 $mode & 73 ? :
829 0 12 if $realtarget ne $targetfile
834 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 } })
840 0 7 if $verbose
843 8 11 if ($uninstall_shadows)
844 0 8 $realtarget ne $targetfile ? :
854 17 0 if ($pack{'write'})
857 0 17 if $verbose
858 15 2 unless $dry_run
878 0 17 if ($MUST_REBOOT) { }
0 17 elsif (defined $MUST_REBOOT & $verbose) { }
906 0 34 if (defined $INSTALL_ROOT) { }
915 0 36 if (defined $INSTALL_ROOT) { }
957 0 0 if $_ eq '.exists'
958 0 0 if (-f $_)
990 0 0 unless @_ < 2
991 0 0 @_ ? :
992 0 0 unless defined $FULLEXT
1001 0 0 if ($ExtUtils::Install::Config{'installhtmldir'})
1017 0 0 &directory_not_empty($INST_ARCHLIB) ? :
1042 0 0 unless -f $fil
1050 0 0 if $verbose
1051 0 0 unless $dry_run
1053 0 0 if $verbose
1054 0 0 unless $dry_run
1085 8 0 defined $ENV{'PERL5LIB'} ? :
1098 2 62 if $canonpath eq $Curdir
1099 18 44 if $seen_dir{$canonpath}++
1101 34 10 unless -f $targetfile
1107 4 6 if (-f $targetfile and -s _ == -s $filepath) { }
1113 0 10 if $diff and $verbose > 1
1115 4 6 if (not $diff or $targetfile eq $ignore)
1119 0 6 if ($dry_run) { }
1121 0 0 if ($verbose)
1131 0 6 if $verbose
1133 0 2 if $ExtUtils::Install::Testing and ucase('File::Spec'->canonpath($ExtUtils::Install::Testing)) eq ucase($targetfile)
1139 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 } })
1141 2 2 if ($seen_ours) { }
1164 0 0 unless open CMD, "|$cmd >$dest"
1165 0 0 unless open SRC, $src
1172 0 0 unless close CMD
1202 5 1 if defined $autodir
1204 0 3 if (-f $to and -s $from == -s $to and -M $to < -M $from)
1205 0 0 unless $INSTALL_QUIET
1217 3 3 if (not $need_filtering and 0 == _compare($from, $to))
1218 3 0 unless $INSTALL_QUIET
1221 0 3 if (-f $to) { }
1227 0 3 if ($need_filtering) { }
1232 3 0 unless $INSTALL_QUIET
1236 0 3 $mode & 73 ? :
1237 0 3 unless $from =~ /\.pm$/
1238 3 0 if defined $autodir
1258 0 3 if defined *AutoSplit::IN{'IO'}
1274 0 0 unless (defined $INSTALL_ROOT)
1278 0 0 @{$self->{$file};} > 1 ? :
1285 0 0 $i > 1 ? :
1287 0 0 _invokant() eq 'ExtUtils::MakeMaker' ? :
1315 0 0 if ($top =~ /^Build/i or exists $INC{'Module/Build.pm'}) { }