example/inc/Module/Install/MakeMaker.pm

filter: Statementstmt 84.8% 28 / 33 Branchbran 40.0% 4 / 10 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 71.4% 40 / 56 CC 8 SCAR 19.8
CC
8
Cov
72%
WriteMakefile
13.1
END
2.0
BEGIN
1.0
CRAP 7.2
« inc/ExtUtils/Depends.pm ↑ Summary example/inc/Module/Install/Base.pm »
1 #line 1
2 #line 1
3 1 ▶package Module::Install::MakeMaker;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶ 
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 use Module::Install::Base;
7 1 ▶use ExtUtils::MakeMaker ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶ 
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 use vars qw{$VERSION $ISCORE @ISA};
10 1 BEGIN {
11 1 $VERSION = '0.77';
12 $ISCORE = 1;
13 @ISA = qw{Module::Install::Base};
14 1 }
15  
16 1 ▶my $makefile;
Subroutine WriteMakefile: called CC=7 SCAR=25.7
Pod undocumented
17 1  
18 1 sub WriteMakefile {
19 my ($self, %args) = @_;
20 $makefile = $self->load('Makefile');
21 1  
22 1 ▶ # mapping between MakeMaker and META.yml keys
Branch: 1 branch
BranchTrueFalseTotal
unless ($args{"NAME"} = $args{"DISTNAME"} or not $args{"MODULE_NAME"}) 0 1 1
Condition33%1/3
$args{"NAME"} = $args{"DISTNAME"} or not $args{"MODULE_NAME"}
l!l&&r!l&&!r
010
MC/DC0%0/2
$args{"NAME"} = $args{"DISTNAME"} or not $args{"MODULE_NAME"}
$args{"NAME"} = $args{"DISTNAME"} not $args{"MODULE_NAME"}
Truth table33%1/3
A or not(B)
A= $args{"NAME"} = $args{"DISTNAME"}B= not $args{"MODULE_NAME"}
ABresult
1X1
011
000
23 0 $args{MODULE_NAME} = $args{NAME};
24 0 unless ( $args{NAME} = $args{DISTNAME} or ! $args{MODULE_NAME} ) {
25 $args{NAME} = $args{MODULE_NAME};
26 $args{NAME} =~ s/::/-/g;
27 1 }
28 7 ▶ 
Branch: 1 branch
BranchTrueFalseTotal
my $value = delete $args{uc $key} or next 0 7 7
29 0 foreach my $key ( qw{name module_name version version_from abstract author installdirs} ) {
30 my $value = delete($args{uc($key)}) or next;
31 $self->$key($value);
32 1 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
if (my $prereq = delete $args{"PREREQ_PM"}) 0 1 1
33 0 ▶ 
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %$prereq) 0 0 0
34 0 if (my $prereq = delete($args{PREREQ_PM})) {
35 while (my($k,$v) = each %$prereq) {
36 $self->requires($k,$v);
37 }
38 }
39 1  
40 # put the remaining args to makemaker_args
41 $self->makemaker_args(%args);
42 1 ▶}
Subroutine END: called CC=2 SCAR=7.1
43 1 ▶ 
Branch: 1 branch
BranchTrueFalseTotal
if ($makefile) 1 0 1
44 1 END {
45 1 if ( $makefile ) {
46 $makefile->write;
47 $makefile->Meta->write;
48 }
49 1 }
50  
51 1;
« inc/ExtUtils/Depends.pm ↑ Summary example/inc/Module/Install/Base.pm »