lib/Module/Install/Win32.pm

filter: Statementstmt 81.8% 18 / 22 Branchbran 25.0% 1 / 4 Conditioncond 33.3% 3 / 9 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 60.0% 27 / 45 CC 6 SCAR 21.3
CC
6
Cov
63%
check_nmake
13.4
BEGIN
1.0
BEGIN
1.0
CRAP 8.5
« lib/Module/Install/MakeMaker.pm ↑ Summary lib/Module/Install/External.pm »
1 package Module::Install::Win32;
2  
3 46 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 46 ▶use Module::Install::Base ();
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 46 ▶use vars qw{$VERSION @ISA $ISCORE};
Subroutine BEGIN: called CC=1 SCAR=0.0
7 46 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
8 46 $VERSION = '1.21';
9 46 @ISA = 'Module::Install::Base';
10 46 $ISCORE = 1;
11 }
12  
13 # determine if the user needs nmake, and download it if needed
14 41 ▶sub check_nmake {
Subroutine check_nmake: called CC=6 SCAR=26.0
Pod undocumented
15 41 my $self = shift;
16 41 $self->load('can_run');
17 41 $self->load('get_file');
18  
19 41 require Config;
20 return unless (
21 $^O eq 'MSWin32' and
22 $Config::Config{make} and
23 41 ▶ $Config::Config{make} =~ /^nmake\b/i and
Branch: 1 branch
BranchTrueFalseTotal
unless $^O eq "MSWin32" and $Config::Config{"make"} and $Config::Config{"make"} =~ /^nmake\b/i and not $self->can_run("nmake") 41 0 41
Condition33%3/9
$^O eq "MSWin32" and $Config::Config{"make"} and $Config::Config{"make"} =~ /^nmake\b/i and not $self->can_run("nmake")
!ll&&!rl&&r
4100
$^O eq "MSWin32" and $Config::Config{"make"} and $Config::Config{"make"} =~ /^nmake\b/i
!ll&&!rl&&r
4100
$^O eq "MSWin32" and $Config::Config{"make"}
!ll&&!rl&&r
4100
MC/DC0%0/4
$^O eq "MSWin32" and $Config::Config{"make"} and $Config::Config{"make"} =~ /^nmake\b/i and not $self->can_run("nmake")
$^O eq "MSWin32" $Config::Config{"make"} $Config::Config{"make"} =~ /^nmake\b/i not $self->can_run("nmake")
Truth table20%1/5
A and B and C and not(D)
A= $^O eq "MSWin32"B= $Config::Config{"make"}C= $Config::Config{"make"} =~ /^nmake\b/iD= not $self->can_run("nmake")
ABCDresult
0XXX0
10XX0
110X0
11100
11111
24 ! $self->can_run('nmake')
25 );
26  
27 0 print "The required 'nmake' executable not found, fetching it...\n";
28  
29 0 require File::Basename;
30 0 my $rv = $self->get_file(
31 url => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
32 ftp_url => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
33 local_dir => File::Basename::dirname($^X),
34 size => 51928,
35 run => 'Nmake15.exe /o > nul',
36 check_for => 'Nmake.exe',
37 remove => 1,
38 );
39  
40 0 ▶ die <<'END_MESSAGE' unless $rv;
Branch: 1 branch
BranchTrueFalseTotal
unless $rv 0 0 0
41  
42 -------------------------------------------------------------------------------
43  
44 Since you are using Microsoft Windows, you will need the 'nmake' utility
45 before installation. It's available at:
46  
47 http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
48 or
49 ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe
50  
51 Please download the file manually, save it to a directory in %PATH% (e.g.
52 C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to
53 that directory, and run "Nmake15.exe" from there; that will create the
54 'nmake.exe' file needed by this module.
55  
56 You may then resume the installation process described in README.
57  
58 -------------------------------------------------------------------------------
59 END_MESSAGE
60  
61 }
62  
63 46 1;
« lib/Module/Install/MakeMaker.pm ↑ Summary lib/Module/Install/External.pm »