| 1 | #line 1 | ||||||||||||||||||||||||||||||||||||||||||||||
| 2 | package Module::Install::Makefile; | ||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use strict 'vars'; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use ExtUtils::MakeMaker (); | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use Module::Install::Base (); | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 7 | use Fcntl qw/:flock :seek/; | ||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | ▶ | use vars qw{$VERSION @ISA $ISCORE}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 2 | BEGIN { | |||||||||||||||||||||||||||||||||||||||||||||
| 11 | 2 | $VERSION = '1.19'; | |||||||||||||||||||||||||||||||||||||||||||||
| 12 | 2 | @ISA = 'Module::Install::Base'; | |||||||||||||||||||||||||||||||||||||||||||||
| 13 | $ISCORE = 1; | ||||||||||||||||||||||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
Makefile: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 16 | sub Makefile { $_[0] } | ||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 2 | ||||||||||||||||||||||||||||||||||||||||||||||
| 18 | my %seen = (); | ||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
prompt: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | sub prompt { | |||||||||||||||||||||||||||||||||||||||||||||
| 21 | shift; | ||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | # Infinite loop protection | |||||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | ▶ | my @c = caller(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 26 | die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])"; | ||||||||||||||||||||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 0 | ▶ | # In automated testing or non-interactive session, always use defaults | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$ENV{"AUTOMATED_TESTING"} || -!-t(STDIN) and not $ENV{"PERL_MM_USE_DEFAULT"}
$ENV{"AUTOMATED_TESTING"} or -!-t(STDIN)
MC/DC0%0/3
$ENV{"AUTOMATED_TESTING"} || -!-t(STDIN) and not $ENV{"PERL_MM_USE_DEFAULT"}
$ENV{"AUTOMATED_TESTING"}
-!-t(STDIN)
not $ENV{"PERL_MM_USE_DEFAULT"}
Truth table0%0/5
A or not(B) and not(C)
A= $ENV{"AUTOMATED_TESTING"}B= -!-t(STDIN)C= not $ENV{"PERL_MM_USE_DEFAULT"}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | local $ENV{PERL_MM_USE_DEFAULT} = 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 32 | goto &ExtUtils::MakeMaker::prompt; | ||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | } else { | |||||||||||||||||||||||||||||||||||||||||||||
| 34 | goto &ExtUtils::MakeMaker::prompt; | ||||||||||||||||||||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||||||
| 38 | # Store a cleaned up version of the MakeMaker version, | ||||||||||||||||||||||||||||||||||||||||||||||
| 39 | # since we need to behave differently in a variety of | ||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 2 | # ways based on the MM version. | |||||||||||||||||||||||||||||||||||||||||||||
| 41 | my $makemaker = eval $ExtUtils::MakeMaker::VERSION; | ||||||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||||||
| 43 | # If we are passed a param, do a "newer than" comparison. | ||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 10 | ▶ | # Otherwise, just return the MakeMaker version. | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
makemaker: called CC=3 SCAR=14.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 10 | ▶ | sub makemaker { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
@_ < 2 or $makemaker >= eval $_[1]
MC/DC0%0/2
@_ < 2 or $makemaker >= eval $_[1]
@_ < 2
$makemaker >= eval $_[1]
Truth table33%1/3
A or B
A= @_ < 2B= $makemaker >= eval $_[1]
| |||||||||||||||||||||||||||||||||||||||||||||||
| 46 | ( @_ < 2 or $makemaker >= eval($_[1]) ) ? $makemaker : 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||||||
| 49 | # Ripped from ExtUtils::MakeMaker 6.56, and slightly modified | ||||||||||||||||||||||||||||||||||||||||||||||
| 50 | # as we only need to know here whether the attribute is an array | ||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 2 | # or a hash or something else (which may or may not be appendable). | |||||||||||||||||||||||||||||||||||||||||||||
| 52 | my %makemaker_argtype = ( | ||||||||||||||||||||||||||||||||||||||||||||||
| 53 | C => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 54 | CONFIG => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 55 | # CONFIGURE => 'CODE', # ignore | ||||||||||||||||||||||||||||||||||||||||||||||
| 56 | DIR => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 57 | DL_FUNCS => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 58 | DL_VARS => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 59 | EXCLUDE_EXT => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 60 | EXE_FILES => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 61 | FUNCLIST => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 62 | H => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 63 | IMPORTS => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 64 | INCLUDE_EXT => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 65 | LIBS => 'ARRAY', # ignore '' | ||||||||||||||||||||||||||||||||||||||||||||||
| 66 | MAN1PODS => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 67 | MAN3PODS => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 68 | META_ADD => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 69 | META_MERGE => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 70 | PL_FILES => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 71 | PM => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 72 | PMLIBDIRS => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 73 | PMLIBPARENTDIRS => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 74 | PREREQ_PM => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 75 | CONFIGURE_REQUIRES => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 76 | SKIP => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 77 | TYPEMAPS => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||
| 78 | XS => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 79 | # VERSION => ['version',''], # ignore | ||||||||||||||||||||||||||||||||||||||||||||||
| 80 | # _KEEP_AFTER_FLUSH => '', | ||||||||||||||||||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||||||||||||||||||
| 82 | clean => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 83 | depend => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 84 | dist => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 85 | dynamic_lib=> 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 86 | linkext => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 87 | macro => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 88 | postamble => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 89 | realclean => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 90 | test => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 91 | tool_autosplit => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||||||
| 93 | # special cases where you can use makemaker_append | ||||||||||||||||||||||||||||||||||||||||||||||
| 94 | CCFLAGS => 'APPENDABLE', | ||||||||||||||||||||||||||||||||||||||||||||||
| 95 | DEFINE => 'APPENDABLE', | ||||||||||||||||||||||||||||||||||||||||||||||
| 96 | INC => 'APPENDABLE', | ||||||||||||||||||||||||||||||||||||||||||||||
| 97 | LDDLFLAGS => 'APPENDABLE', | ||||||||||||||||||||||||||||||||||||||||||||||
| 98 | LDFROM => 'APPENDABLE', | ||||||||||||||||||||||||||||||||||||||||||||||
| 99 | ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 8 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
makemaker_args: called CC=13 SCAR=47.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 8 | sub makemaker_args { | |||||||||||||||||||||||||||||||||||||||||||||
| 102 | 8 | ▶ | my ($self, %new_args) = @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$self->{"makemaker_args"} ||= {}
MC/DC100%1/1
$self->{"makemaker_args"} ||= {}
$self->{"makemaker_args"}
Truth table100%2/2
A
A= $self->{"makemaker_args"}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 8 | my $args = ( $self->{makemaker_args} ||= {} ); | |||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | ▶ | foreach my $key (keys %new_args) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | ▶ | if ($makemaker_argtype{$key}) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | ▶ | if ($makemaker_argtype{$key} eq 'ARRAY') { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | ▶ | $args->{$key} = [] unless defined $args->{$key}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | unless (ref $args->{$key} eq 'ARRAY') { | |||||||||||||||||||||||||||||||||||||||||||||
| 109 | $args->{$key} = [$args->{$key}] | ||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | ▶ | } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 111 | push @{$args->{$key}}, | ||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | ref $new_args{$key} eq 'ARRAY' | |||||||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | ? @{$new_args{$key}} | |||||||||||||||||||||||||||||||||||||||||||||
| 114 | : $new_args{$key}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 115 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | ▶ | elsif ($makemaker_argtype{$key} eq 'HASH') { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | $args->{$key} = {} unless defined $args->{$key}; | |||||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | foreach my $skey (keys %{ $new_args{$key} }) { | |||||||||||||||||||||||||||||||||||||||||||||
| 119 | $args->{$key}{$skey} = $new_args{$key}{$skey}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 121 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 0 | elsif ($makemaker_argtype{$key} eq 'APPENDABLE') { | |||||||||||||||||||||||||||||||||||||||||||||
| 123 | $self->makemaker_append($key => $new_args{$key}); | ||||||||||||||||||||||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 125 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | ▶ | else { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 0 | if (defined $args->{$key}) { | |||||||||||||||||||||||||||||||||||||||||||||
| 128 | warn qq{MakeMaker attribute "$key" is overriden; use "makemaker_append" to append values\n}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | } | |||||||||||||||||||||||||||||||||||||||||||||
| 130 | $args->{$key} = $new_args{$key}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 131 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 8 | } | |||||||||||||||||||||||||||||||||||||||||||||
| 133 | return $args; | ||||||||||||||||||||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||||||
| 136 | # For mm args that take multiple space-separated args, | ||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | ▶ | # append an argument to the current list. | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
makemaker_append: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | sub makemaker_append { | |||||||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 140 | 0 | my $name = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 141 | my $args = $self->makemaker_args; | ||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | ▶ | $args->{$name} = defined $args->{$name} | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 143 | ? join( ' ', $args->{$name}, @_ ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 144 | : join( ' ', @_ ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 145 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
build_subdirs: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 147 | 0 | sub build_subdirs { | |||||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->makemaker_args->{"DIR"} ||= []
MC/DC0%0/1
$self->makemaker_args->{"DIR"} ||= []
$self->makemaker_args->{"DIR"}
Truth table0%0/2
A
A= $self->makemaker_args->{"DIR"}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | my $subdirs = $self->makemaker_args->{DIR} ||= []; | |||||||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | for my $subdir (@_) { | |||||||||||||||||||||||||||||||||||||||||||||
| 151 | push @$subdirs, $subdir; | ||||||||||||||||||||||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
clean_files: called CC=3 SCAR=12.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 2 | sub clean_files { | |||||||||||||||||||||||||||||||||||||||||||||
| 156 | 2 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->makemaker_args->{"clean"} ||= {}
MC/DC0%0/1
$self->makemaker_args->{"clean"} ||= {}
$self->makemaker_args->{"clean"}
Truth table50%1/2
A
A= $self->makemaker_args->{"clean"}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 157 | my $clean = $self->makemaker_args->{clean} ||= {}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 158 | %$clean = ( | ||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 2 | ▶ | %$clean, | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$clean->{'FILES'} || ()
MC/DC0%0/2
$clean->{'FILES'} || ()
$clean->{'FILES'}
()
Truth table33%1/3
A || B
A= $clean->{'FILES'}B= ()
| |||||||||||||||||||||||||||||||||||||||||||||||
| 160 | FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_), | ||||||||||||||||||||||||||||||||||||||||||||||
| 161 | ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 162 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 163 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
realclean_files: called CC=3 SCAR=12.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 2 | sub realclean_files { | |||||||||||||||||||||||||||||||||||||||||||||
| 165 | 2 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->makemaker_args->{"realclean"} ||= {}
MC/DC0%0/1
$self->makemaker_args->{"realclean"} ||= {}
$self->makemaker_args->{"realclean"}
Truth table50%1/2
A
A= $self->makemaker_args->{"realclean"}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 166 | my $realclean = $self->makemaker_args->{realclean} ||= {}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 167 | %$realclean = ( | ||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 2 | ▶ | %$realclean, | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$realclean->{'FILES'} || ()
MC/DC0%0/2
$realclean->{'FILES'} || ()
$realclean->{'FILES'}
()
Truth table33%1/3
A || B
A= $realclean->{'FILES'}B= ()
| |||||||||||||||||||||||||||||||||||||||||||||||
| 169 | FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_), | ||||||||||||||||||||||||||||||||||||||||||||||
| 170 | ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
libs: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | sub libs { | |||||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | my $libs = ref $_[0] ? shift : [ shift ]; | |||||||||||||||||||||||||||||||||||||||||||||
| 176 | $self->makemaker_args( LIBS => $libs ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 177 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
inc: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 0 | sub inc { | |||||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 181 | $self->makemaker_args( INC => shift ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 182 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_wanted_t: not called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 184 | sub _wanted_t { | ||||||||||||||||||||||||||||||||||||||||||||||
| 185 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
tests_recursive: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | sub tests_recursive { | |||||||||||||||||||||||||||||||||||||||||||||
| 188 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift() || 't'
MC/DC0%0/1
shift() || 't'
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | ▶ | my $dir = shift || 't'; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | unless ( -d $dir ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 191 | die "tests_recursive dir '$dir' does not exist"; | ||||||||||||||||||||||||||||||||||||||||||||||
| 192 | 0 | ▶ | } | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->tests || ''
MC/DC0%0/1
$self->tests || ''
$self->tests
Truth table0%0/2
A
A= $self->tests
| |||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | my %tests = map { $_ => 1 } split / /, ($self->tests || ''); | |||||||||||||||||||||||||||||||||||||||||||||
| 194 | require File::Find; | ||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | ▶ | File::Find::find( | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
Branch: 1 branch
Condition0%0/3
/\.t$/ and -f $_
MC/DC0%0/2
/\.t$/ and -f $_
/\.t$/
-f $_
Truth table0%0/3
A and B
A= /\.t$/B= -f $_
| |||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | sub { /\.t$/ and -f $_ and $tests{"$File::Find::dir/*.t"} = 1 }, | |||||||||||||||||||||||||||||||||||||||||||||
| 197 | $dir | ||||||||||||||||||||||||||||||||||||||||||||||
| 198 | 0 | ); | |||||||||||||||||||||||||||||||||||||||||||||
| 199 | $self->tests( join ' ', sort keys %tests ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 200 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 201 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
write: called CC=37 SCAR=54.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 202 | 2 | sub write { | |||||||||||||||||||||||||||||||||||||||||||||
| 203 | 2 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 204 | die "&Makefile->write() takes no arguments\n" if @_; | ||||||||||||||||||||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 2 | # Check the current Perl version | |||||||||||||||||||||||||||||||||||||||||||||
| 207 | 2 | ▶ | my $perl_version = $self->perl_version; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 208 | 0 | ▶ | if ( $perl_version ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 209 | eval "use $perl_version; 1" | ||||||||||||||||||||||||||||||||||||||||||||||
| 210 | or die "ERROR: perl: Version $] is installed, " | ||||||||||||||||||||||||||||||||||||||||||||||
| 211 | . "but we need version >= $perl_version"; | ||||||||||||||||||||||||||||||||||||||||||||||
| 212 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||||||||||||||||||||
| 214 | 2 | # Make sure we have a new enough MakeMaker | |||||||||||||||||||||||||||||||||||||||||||||
| 215 | require ExtUtils::MakeMaker; | ||||||||||||||||||||||||||||||||||||||||||||||
| 216 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$perl_version and $self->_cmp($perl_version, "5.006") >= 0
MC/DC0%0/2
$perl_version and $self->_cmp($perl_version, "5.006") >= 0
$perl_version
$self->_cmp($perl_version, "5.006") >= 0
Truth table33%1/3
A and B
A= $perl_versionB= $self->_cmp($perl_version, "5.006") >= 0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 217 | if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 218 | # This previous attempted to inherit the version of | ||||||||||||||||||||||||||||||||||||||||||||||
| 219 | # ExtUtils::MakeMaker in use by the module author, but this | ||||||||||||||||||||||||||||||||||||||||||||||
| 220 | # was found to be untenable as some authors build releases | ||||||||||||||||||||||||||||||||||||||||||||||
| 221 | # using future dev versions of EU:MM that nobody else has. | ||||||||||||||||||||||||||||||||||||||||||||||
| 222 | # Instead, #toolchain suggests we use 6.59 which is the most | ||||||||||||||||||||||||||||||||||||||||||||||
| 223 | # stable version on CPAN at time of writing and is, to quote | ||||||||||||||||||||||||||||||||||||||||||||||
| 224 | # ribasushi, "not terminally fucked, > and tested enough". | ||||||||||||||||||||||||||||||||||||||||||||||
| 225 | # TODO: We will now need to maintain this over time to push | ||||||||||||||||||||||||||||||||||||||||||||||
| 226 | 0 | # the version up as new versions are released. | |||||||||||||||||||||||||||||||||||||||||||||
| 227 | 0 | $self->build_requires( 'ExtUtils::MakeMaker' => 6.59 ); | |||||||||||||||||||||||||||||||||||||||||||||
| 228 | $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 229 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 230 | # Allow legacy-compatibility with 5.005 by depending on the | ||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 2 | # most recent EU:MM that supported 5.005. | |||||||||||||||||||||||||||||||||||||||||||||
| 232 | 2 | $self->build_requires( 'ExtUtils::MakeMaker' => 6.36 ); | |||||||||||||||||||||||||||||||||||||||||||||
| 233 | $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 234 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||||||||||
| 236 | 2 | # Generate the MakeMaker params | |||||||||||||||||||||||||||||||||||||||||||||
| 237 | 2 | my $args = $self->makemaker_args; | |||||||||||||||||||||||||||||||||||||||||||||
| 238 | 2 | ▶ | $args->{DISTNAME} = $self->name; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$self->module_name || $self->name
MC/DC0%0/2
$self->module_name || $self->name
$self->module_name
$self->name
Truth table33%1/3
A || B
A= $self->module_nameB= $self->name
| |||||||||||||||||||||||||||||||||||||||||||||||
| 239 | 2 | $args->{NAME} = $self->module_name || $self->name; | |||||||||||||||||||||||||||||||||||||||||||||
| 240 | 2 | ▶ | $args->{NAME} =~ s/-/::/g; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 241 | $args->{VERSION} = $self->version or die <<'EOT'; | ||||||||||||||||||||||||||||||||||||||||||||||
| 242 | ERROR: Can't determine distribution version. Please specify it | ||||||||||||||||||||||||||||||||||||||||||||||
| 243 | explicitly via 'version' in Makefile.PL, or set a valid $VERSION | ||||||||||||||||||||||||||||||||||||||||||||||
| 244 | in a module, and provide its file path via 'version_from' (or | ||||||||||||||||||||||||||||||||||||||||||||||
| 245 | 'all_from' if you prefer) in Makefile.PL. | ||||||||||||||||||||||||||||||||||||||||||||||
| 246 | EOT | ||||||||||||||||||||||||||||||||||||||||||||||
| 247 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 0 | if ( $self->tests ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 249 | 0 | my @tests = split ' ', $self->tests; | |||||||||||||||||||||||||||||||||||||||||||||
| 250 | my %seen; | ||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 0 | $args->{test} = { | |||||||||||||||||||||||||||||||||||||||||||||
| 252 | TESTS => (join ' ', grep {!$seen{$_}++} @tests), | ||||||||||||||||||||||||||||||||||||||||||||||
| 253 | }; | ||||||||||||||||||||||||||||||||||||||||||||||
| 254 | } elsif ( $Module::Install::ExtraTests::use_extratests ) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 255 | # Module::Install::ExtraTests doesn't set $self->tests and does its own tests via harness. | ||||||||||||||||||||||||||||||||||||||||||||||
| 256 | ▶ | # So, just ignore our xt tests here. | |||||||||||||||||||||||||||||||||||||||||||||
|
Condition16%1/6
-d "xt" and $Module::Install::AUTHOR || $ENV{"RELEASE_TESTING"}
$Module::Install::AUTHOR or $ENV{"RELEASE_TESTING"}
MC/DC0%0/3
-d "xt" and $Module::Install::AUTHOR || $ENV{"RELEASE_TESTING"}
-d "xt"
$Module::Install::AUTHOR
$ENV{"RELEASE_TESTING"}
Truth table25%1/4
A and B or C
A= -d "xt"B= $Module::Install::AUTHORC= $ENV{"RELEASE_TESTING"}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 257 | } elsif ( -d 'xt' and ($Module::Install::AUTHOR or $ENV{RELEASE_TESTING}) ) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 258 | 0 | $args->{test} = { | |||||||||||||||||||||||||||||||||||||||||||||
| 259 | TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ), | ||||||||||||||||||||||||||||||||||||||||||||||
| 260 | }; | ||||||||||||||||||||||||||||||||||||||||||||||
| 261 | 2 | ▶ | } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 262 | 2 | if ( $] >= 5.005 ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 263 | 2 | ▶ | $args->{ABSTRACT} = $self->abstract; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->author || []
MC/DC0%0/1
$self->author || []
$self->author
Truth table50%1/2
A
A= $self->author
| |||||||||||||||||||||||||||||||||||||||||||||||
| 264 | $args->{AUTHOR} = join ', ', @{$self->author || []}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 265 | 2 | ▶ | } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 2 | if ( $self->makemaker(6.10) ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 267 | $args->{NO_META} = 1; | ||||||||||||||||||||||||||||||||||||||||||||||
| 268 | #$args->{NO_MYMETA} = 1; | ||||||||||||||||||||||||||||||||||||||||||||||
| 269 | 2 | ▶ | } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$self->makemaker("6.17") and $self->sign
MC/DC0%0/2
$self->makemaker("6.17") and $self->sign
$self->makemaker("6.17")
$self->sign
Truth table33%1/3
A and B
A= $self->makemaker("6.17")B= $self->sign
| |||||||||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | if ( $self->makemaker(6.17) and $self->sign ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 271 | $args->{SIGN} = 1; | ||||||||||||||||||||||||||||||||||||||||||||||
| 272 | 2 | ▶ | } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 273 | 0 | unless ( $self->is_admin ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 274 | delete $args->{SIGN}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 2 | ▶ | } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$self->makemaker("6.31") and $self->license
MC/DC0%0/2
$self->makemaker("6.31") and $self->license
$self->makemaker("6.31")
$self->license
Truth table33%1/3
A and B
A= $self->makemaker("6.31")B= $self->license
| |||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 2 | if ( $self->makemaker(6.31) and $self->license ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 277 | $args->{LICENSE} = $self->license; | ||||||||||||||||||||||||||||||||||||||||||||||
| 278 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 279 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$args->{"PREREQ_PM"} ||= {}
MC/DC0%0/1
$args->{"PREREQ_PM"} ||= {}
$args->{"PREREQ_PM"}
Truth table50%1/2
A
A= $args->{"PREREQ_PM"}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 280 | my $prereq = ($args->{PREREQ_PM} ||= {}); | ||||||||||||||||||||||||||||||||||||||||||||||
| 281 | 0 | %$prereq = ( %$prereq, | |||||||||||||||||||||||||||||||||||||||||||||
| 282 | 0 | map { @$_ } # flatten [module => version] | |||||||||||||||||||||||||||||||||||||||||||||
| 283 | map { @$_ } | ||||||||||||||||||||||||||||||||||||||||||||||
| 284 | grep $_, | ||||||||||||||||||||||||||||||||||||||||||||||
| 285 | ($self->requires) | ||||||||||||||||||||||||||||||||||||||||||||||
| 286 | ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 287 | |||||||||||||||||||||||||||||||||||||||||||||||
| 288 | 2 | # Remove any reference to perl, PREREQ_PM doesn't support it | |||||||||||||||||||||||||||||||||||||||||||||
| 289 | delete $args->{PREREQ_PM}->{perl}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||||||||||||||||||
| 291 | 2 | ▶ | # Merge both kinds of requires into BUILD_REQUIRES | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$args->{"BUILD_REQUIRES"} ||= {}
MC/DC0%0/1
$args->{"BUILD_REQUIRES"} ||= {}
$args->{"BUILD_REQUIRES"}
Truth table50%1/2
A
A= $args->{"BUILD_REQUIRES"}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 292 | my $build_prereq = ($args->{BUILD_REQUIRES} ||= {}); | ||||||||||||||||||||||||||||||||||||||||||||||
| 293 | 4 | %$build_prereq = ( %$build_prereq, | |||||||||||||||||||||||||||||||||||||||||||||
| 294 | 2 | map { @$_ } # flatten [module => version] | |||||||||||||||||||||||||||||||||||||||||||||
| 295 | map { @$_ } | ||||||||||||||||||||||||||||||||||||||||||||||
| 296 | grep $_, | ||||||||||||||||||||||||||||||||||||||||||||||
| 297 | ($self->configure_requires, $self->build_requires) | ||||||||||||||||||||||||||||||||||||||||||||||
| 298 | ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||||||||||||||||||||
| 300 | 2 | # Remove any reference to perl, BUILD_REQUIRES doesn't support it | |||||||||||||||||||||||||||||||||||||||||||||
| 301 | delete $args->{BUILD_REQUIRES}->{perl}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 302 | |||||||||||||||||||||||||||||||||||||||||||||||
| 303 | 2 | ▶ | # Delete bundled dists from prereq_pm, add it to Makefile DIR | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$args->{'DIR'} || []
MC/DC0%0/1
$args->{'DIR'} || []
$args->{'DIR'}
Truth table50%1/2
A
A= $args->{'DIR'}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 2 | ▶ | my $subdirs = ($args->{DIR} || []); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 305 | 0 | if ($self->bundles) { | |||||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | my %processed; | |||||||||||||||||||||||||||||||||||||||||||||
| 307 | 0 | foreach my $bundle (@{ $self->bundles }) { | |||||||||||||||||||||||||||||||||||||||||||||
| 308 | 0 | my ($mod_name, $dist_dir) = @$bundle; | |||||||||||||||||||||||||||||||||||||||||||||
| 309 | 0 | delete $prereq->{$mod_name}; | |||||||||||||||||||||||||||||||||||||||||||||
| 310 | 0 | ▶ | $dist_dir = File::Basename::basename($dist_dir); # dir for building this module | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 311 | 0 | ▶ | if (not exists $processed{$dist_dir}) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 312 | if (-d $dist_dir) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 313 | 0 | # List as sub-directory to be processed by make | |||||||||||||||||||||||||||||||||||||||||||||
| 314 | push @$subdirs, $dist_dir; | ||||||||||||||||||||||||||||||||||||||||||||||
| 315 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 316 | 0 | # Else do nothing: the module is already present on the system | |||||||||||||||||||||||||||||||||||||||||||||
| 317 | $processed{$dist_dir} = undef; | ||||||||||||||||||||||||||||||||||||||||||||||
| 318 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 319 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 320 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 321 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 322 | 0 | unless ( $self->makemaker('6.55_03') ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 323 | 0 | %$prereq = (%$prereq,%$build_prereq); | |||||||||||||||||||||||||||||||||||||||||||||
| 324 | delete $args->{BUILD_REQUIRES}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 325 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 326 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 327 | 0 | ▶ | if ( my $perl_version = $self->perl_version ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 328 | eval "use $perl_version; 1" | ||||||||||||||||||||||||||||||||||||||||||||||
| 329 | or die "ERROR: perl: Version $] is installed, " | ||||||||||||||||||||||||||||||||||||||||||||||
| 330 | . "but we need version >= $perl_version"; | ||||||||||||||||||||||||||||||||||||||||||||||
| 331 | 0 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | if ( $self->makemaker(6.48) ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 333 | $args->{MIN_PERL_VERSION} = $perl_version; | ||||||||||||||||||||||||||||||||||||||||||||||
| 334 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 335 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 336 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 337 | 0 | ▶ | if ($self->installdirs) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 338 | 0 | warn qq{old INSTALLDIRS (probably set by makemaker_args) is overriden by installdirs\n} if $args->{INSTALLDIRS}; | |||||||||||||||||||||||||||||||||||||||||||||
| 339 | $args->{INSTALLDIRS} = $self->installdirs; | ||||||||||||||||||||||||||||||||||||||||||||||
| 340 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||||||||||||||||||||||
| 342 | 2 | my %args = map { | |||||||||||||||||||||||||||||||||||||||||||||
| 343 | ( $_ => $args->{$_} ) } grep {defined($args->{$_} ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 344 | } keys %$args; | ||||||||||||||||||||||||||||||||||||||||||||||
| 345 | 2 | ||||||||||||||||||||||||||||||||||||||||||||||
| 346 | 2 | ▶ | my $user_preop = delete $args{dist}->{PREOP}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 347 | 2 | if ( my $preop = $self->admin->preop($user_preop) ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 348 | 2 | foreach my $key ( keys %$preop ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 349 | $args{dist}->{$key} = $preop->{$key}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 350 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 351 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 352 | 2 | ||||||||||||||||||||||||||||||||||||||||||||||
| 353 | 2 | ▶ | my $mm = ExtUtils::MakeMaker::WriteMakefile(%args); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$mm->{'FIRST_MAKEFILE'} || 'Makefile'
MC/DC0%0/1
$mm->{'FIRST_MAKEFILE'} || 'Makefile'
$mm->{'FIRST_MAKEFILE'}
Truth table50%1/2
A
A= $mm->{'FIRST_MAKEFILE'}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 354 | $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile'); | ||||||||||||||||||||||||||||||||||||||||||||||
| 355 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 356 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
fix_up_makefile: called CC=8 SCAR=21.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 357 | 2 | sub fix_up_makefile { | |||||||||||||||||||||||||||||||||||||||||||||
| 358 | 2 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 359 | 2 | ▶ | my $makefile_name = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
ref $self->_top || ''
MC/DC0%0/1
ref $self->_top || ''
ref $self->_top
Truth table50%1/2
A
A= ref $self->_top
| |||||||||||||||||||||||||||||||||||||||||||||||
| 360 | 2 | ▶ | my $top_class = ref($self->_top) || ''; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->_top->VERSION || ''
MC/DC0%0/1
$self->_top->VERSION || ''
$self->_top->VERSION
Truth table50%1/2
A
A= $self->_top->VERSION
| |||||||||||||||||||||||||||||||||||||||||||||||
| 361 | my $top_version = $self->_top->VERSION || ''; | ||||||||||||||||||||||||||||||||||||||||||||||
| 362 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 363 | my $preamble = $self->preamble | ||||||||||||||||||||||||||||||||||||||||||||||
| 364 | ? "# Preamble by $top_class $top_version\n" | ||||||||||||||||||||||||||||||||||||||||||||||
| 365 | . $self->preamble | ||||||||||||||||||||||||||||||||||||||||||||||
| 366 | 2 | ▶ | : ''; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->postamble || ''
MC/DC0%0/1
$self->postamble || ''
$self->postamble
Truth table50%1/2
A
A= $self->postamble
| |||||||||||||||||||||||||||||||||||||||||||||||
| 367 | my $postamble = "# Postamble by $top_class $top_version\n" | ||||||||||||||||||||||||||||||||||||||||||||||
| 368 | . ($self->postamble || ''); | ||||||||||||||||||||||||||||||||||||||||||||||
| 369 | 2 | ||||||||||||||||||||||||||||||||||||||||||||||
| 370 | 2 | ▶ | local *MAKEFILE; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 371 | 2 | open MAKEFILE, "+< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!"; | |||||||||||||||||||||||||||||||||||||||||||||
| 372 | 2 | eval { flock MAKEFILE, LOCK_EX }; | |||||||||||||||||||||||||||||||||||||||||||||
| 373 | my $makefile = do { local $/; <MAKEFILE> }; | ||||||||||||||||||||||||||||||||||||||||||||||
| 374 | 2 | ||||||||||||||||||||||||||||||||||||||||||||||
| 375 | 2 | $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /; | |||||||||||||||||||||||||||||||||||||||||||||
| 376 | 2 | $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g; | |||||||||||||||||||||||||||||||||||||||||||||
| 377 | 2 | $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g; | |||||||||||||||||||||||||||||||||||||||||||||
| 378 | 2 | $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m; | |||||||||||||||||||||||||||||||||||||||||||||
| 379 | $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m; | ||||||||||||||||||||||||||||||||||||||||||||||
| 380 | |||||||||||||||||||||||||||||||||||||||||||||||
| 381 | # Module::Install will never be used to build the Core Perl | ||||||||||||||||||||||||||||||||||||||||||||||
| 382 | # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks | ||||||||||||||||||||||||||||||||||||||||||||||
| 383 | 2 | # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist | |||||||||||||||||||||||||||||||||||||||||||||
| 384 | $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m; | ||||||||||||||||||||||||||||||||||||||||||||||
| 385 | #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m; | ||||||||||||||||||||||||||||||||||||||||||||||
| 386 | |||||||||||||||||||||||||||||||||||||||||||||||
| 387 | 2 | # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well. | |||||||||||||||||||||||||||||||||||||||||||||
| 388 | $makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g; | ||||||||||||||||||||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||||||||||||||||||||
| 390 | # XXX - This is currently unused; not sure if it breaks other MM-users | ||||||||||||||||||||||||||||||||||||||||||||||
| 391 | # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg; | ||||||||||||||||||||||||||||||||||||||||||||||
| 392 | 2 | ||||||||||||||||||||||||||||||||||||||||||||||
| 393 | 2 | seek MAKEFILE, 0, SEEK_SET; | |||||||||||||||||||||||||||||||||||||||||||||
| 394 | 2 | ▶ | truncate MAKEFILE, 0; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 395 | 2 | ▶ | print MAKEFILE "$preamble$makefile$postamble" or die $!; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 396 | close MAKEFILE or die $!; | ||||||||||||||||||||||||||||||||||||||||||||||
| 397 | 2 | ||||||||||||||||||||||||||||||||||||||||||||||
| 398 | 1; | ||||||||||||||||||||||||||||||||||||||||||||||
| 399 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 400 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
preamble: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 401 | 2 | sub preamble { | |||||||||||||||||||||||||||||||||||||||||||||
| 402 | 2 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 403 | 2 | $self->{preamble} = $text . $self->{preamble} if defined $text; | |||||||||||||||||||||||||||||||||||||||||||||
| 404 | $self->{preamble}; | ||||||||||||||||||||||||||||||||||||||||||||||
| 405 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 406 | 2 | ▶ | |||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
postamble: called CC=3 SCAR=12.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 407 | 2 | sub postamble { | |||||||||||||||||||||||||||||||||||||||||||||
| 408 | 2 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$self->{"postamble"} ||= $self->admin->postamble
MC/DC0%0/2
$self->{"postamble"} ||= $self->admin->postamble
$self->{"postamble"}
$self->admin->postamble
Truth table33%1/3
A ||= B
A= $self->{"postamble"}B= $self->admin->postamble
| |||||||||||||||||||||||||||||||||||||||||||||||
| 409 | 2 | ▶ | $self->{postamble} ||= $self->admin->postamble; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 410 | $self->{postamble} .= $text if defined $text; | ||||||||||||||||||||||||||||||||||||||||||||||
| 411 | 2 | $self->{postamble} | |||||||||||||||||||||||||||||||||||||||||||||
| 412 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 413 | 2 | ||||||||||||||||||||||||||||||||||||||||||||||
| 414 | 1; | ||||||||||||||||||||||||||||||||||||||||||||||
| 415 | |||||||||||||||||||||||||||||||||||||||||||||||
| 416 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||