| 1 | # $Id$ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | package ExtUtils::MakeMaker; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 96 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 96 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 96 | ▶ | BEGIN {require 5.006;} | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 96 | require Exporter; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 96 | ▶ | use ExtUtils::MakeMaker::Config; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 96 | ▶ | use ExtUtils::MakeMaker::version; # ensure we always have our fake version.pm | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 96 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 96 | ▶ | use File::Path; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 96 | my $CAN_DECODE = eval { require ExtUtils::MakeMaker::Locale; }; # 2 birds, 1 stone | |||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 96 | ▶ | eval { ExtUtils::MakeMaker::Locale::reinit('UTF-8') } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$CAN_DECODE and &Encode::find_encoding("locale")->name eq "ascii"
MC/DC0%0/2
$CAN_DECODE and &Encode::find_encoding("locale")->name eq "ascii"
$CAN_DECODE
&Encode::find_encoding("locale")->name eq "ascii"
Truth table33%1/3
A and B
A= $CAN_DECODEB= &Encode::find_encoding("locale")->name eq "ascii"
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | if $CAN_DECODE and Encode::find_encoding('locale')->name eq 'ascii'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 96 | our $Verbose = 0; # exported | |||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 96 | our @Parent; # needs to be localized | |||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 96 | our @Get_from_Config; # referenced by MM_Unix | |||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 96 | our @MM_Sections; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 96 | our @Overridable; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 96 | my @Prepend_parent; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 96 | our %Recognized_Att_Keys; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 96 | our %macro_fsentity; # whether a macro is a filesystem name | |||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 96 | our %macro_dep; # whether a macro is a dependency | |||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 96 | our $VERSION = '7.78'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 96 | $VERSION =~ tr/_//d; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | # Emulate something resembling CVS $Revision$ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 96 | (our $Revision = $VERSION) =~ s{_}{}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 96 | $Revision = int $Revision * 10000; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 96 | our $Filename = __FILE__; # referenced outside MakeMaker | |||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 96 | our @ISA = qw(Exporter); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 96 | our @EXPORT = qw(&WriteMakefile $Verbose &prompt &os_unsupported); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 96 | our @EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists | |||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | &WriteEmptyMakefile &open_for_writing &write_file_via_tmp | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | &_sprintf562); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | # These will go away once the last of the Win32 & VMS specific code is | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | # purged. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 96 | my $Is_VMS = $^O eq 'VMS'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 96 | my $Is_Win32 = $^O eq 'MSWin32'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 96 | our $UNDER_CORE = $ENV{PERL_CORE}; # needs to be our | |||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 96 | full_setup(); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 96 | require ExtUtils::MM; # Things like CPAN assume loading ExtUtils::MakeMaker | |||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | # will give them MM. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 96 | require ExtUtils::MY; # XXX pre-5.8 versions of ExtUtils::Embed expect | |||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | # loading ExtUtils::MakeMaker will give them MY. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | # This will go when Embed is its own CPAN module. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | # 5.6.2 can't do sprintf "%1$s" - this can only do %s | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 322 | ▶ | sub _sprintf562 { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_sprintf562: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 322 | my ($format, @args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 322 | ▶ | for (my $i = 1; $i <= @args; $i++) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 588 | $format =~ s#%$i\$s#$args[$i-1]#g; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 322 | $format; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 225 | ▶ | sub WriteMakefile { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
WriteMakefile: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 225 | ▶ | croak "WriteMakefile: Need even number of args" if @_ % 2; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 225 | require ExtUtils::MY; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 225 | my %att = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 225 | _convert_compat_attrs(\%att); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 225 | _verify_att(\%att); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 225 | my $mm = MM->new(\%att); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 214 | $mm->flush; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 214 | return $mm; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | # Basic signatures of the attributes WriteMakefile takes. Each is the | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | # reference type. Empty value indicate it takes a non-reference | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | # scalar. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 96 | my %Att_Sigs; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 96 | my %Special_Sigs = ( | |||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | AUTHOR => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | C => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | CONFIG => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | CONFIGURE => 'CODE', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | DIR => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | DL_FUNCS => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | DL_VARS => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | EXCLUDE_EXT => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | EXE_FILES => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | FUNCLIST => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | H => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | IMPORTS => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | INCLUDE_EXT => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | LIBS => ['ARRAY',''], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | MAN1PODS => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | MAN3PODS => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | META_ADD => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | META_MERGE => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | OBJECT => ['ARRAY', ''], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | PL_FILES => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | PM => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | PMLIBDIRS => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | PMLIBPARENTDIRS => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | PREREQ_PM => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | BUILD_REQUIRES => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | CONFIGURE_REQUIRES => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | TEST_REQUIRES => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | SKIP => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | TYPEMAPS => 'ARRAY', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | XS => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | XSBUILD => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | VERSION => ['version',''], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | _KEEP_AFTER_FLUSH => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | clean => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | depend => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | dist => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | dynamic_lib=> 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | linkext => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | macro => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | postamble => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | realclean => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | test => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | tool_autosplit => 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 96 | @Att_Sigs{keys %Recognized_Att_Keys} = ('') x keys %Recognized_Att_Keys; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 96 | @Att_Sigs{keys %Special_Sigs} = values %Special_Sigs; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | 454 | ▶ | sub _convert_compat_attrs { #result of running several times should be same | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_convert_compat_attrs: called CC=4 SCAR=14.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 454 | my($att) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 454 | ▶ | if (exists $att->{AUTHOR}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 57 | ▶ | if ($att->{AUTHOR}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 57 | ▶ | if (!ref($att->{AUTHOR})) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 25 | my $t = $att->{AUTHOR}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 25 | $att->{AUTHOR} = [$t]; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | $att->{AUTHOR} = []; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 225 | ▶ | sub _verify_att { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_verify_att: called CC=5 SCAR=16.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 225 | my($att) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 225 | foreach my $key (sort keys %$att) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 767 | my $val = $att->{$key}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 767 | my $sig = $Att_Sigs{$key}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 767 | ▶ | unless( defined $sig ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | 2 | warn "WARNING: $key is not a known parameter.\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 2 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 765 | ▶ | my @sigs = ref $sig ? @$sig : $sig; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 765 | my $given = ref $val; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 765 | ▶ | unless( grep { _is_of_type($val, $_) } @sigs ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | 5 | my $takes = join " or ", map { _format_att($_) } @sigs; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | 5 | my $has = _format_att($given); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | 5 | warn "WARNING: $key takes a $takes not a $has.\n". | |||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | " Please inform the author.\n"; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | # Check if a given thing is a reference or instance of $type | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 805 | ▶ | sub _is_of_type { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_is_of_type: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 805 | my($thing, $type) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 805 | ▶ | return 1 if ref $thing eq $type; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 42 | local $SIG{__DIE__}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | 42 | ▶ | return 1 if eval{ $thing->isa($type) }; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 41 | return 0; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 13 | ▶ | sub _format_att { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_format_att: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | 13 | my $given = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 13 | ▶ | return $given eq '' ? "string/number" | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | : uc $given eq $given ? "$given reference" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | : "$given object" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | ; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 5 | ▶ | sub prompt ($;$) { ## no critic | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
prompt: called CC=13 SCAR=28.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | 5 | my($mess, $def) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | 5 | ▶ | confess("prompt function called without an argument") | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | unless defined $mess; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | 4 | ▶ | my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition11%1/9
-t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT))
-t STDOUT or not -f STDOUT || -c STDOUT
-f STDOUT || -c STDOUT
MC/DC0%0/4
-t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT))
-t STDIN
-t STDOUT
-f STDOUT
-c STDOUT
Truth table20%1/5
A && B or not(C || D)
A= -t STDINB= -t STDOUTC= -f STDOUTD= -c STDOUT
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | 4 | ▶ | my $dispdef = defined $def ? "[$def] " : " "; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | 4 | ▶ | $def = defined $def ? $def : ""; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | 4 | local $|=1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | 4 | local $\; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | 4 | print "$mess $dispdef"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | 4 | my $ans; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 4 | ▶ | if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
$ENV{"PERL_MM_USE_DEFAULT"} or not $isa_tty and eof STDIN
not $isa_tty and eof STDIN
MC/DC33%1/3
$ENV{"PERL_MM_USE_DEFAULT"} or not $isa_tty and eof STDIN
$ENV{"PERL_MM_USE_DEFAULT"}
not $isa_tty
eof STDIN
Truth table50%2/4
A or not(B) and C
A= $ENV{"PERL_MM_USE_DEFAULT"}B= not $isa_ttyC= eof STDIN
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | 3 | print "$def\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | 1 | $ans = <STDIN>; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | 1 | ▶ | if( defined $ans ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | 1 | $ans =~ s{\015?\012$}{}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | else { # user hit ctrl-D | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | print "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | 4 | ▶ | return (!defined $ans || $ans eq '') ? $def : $ans; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
not defined $ans or $ans eq ""
MC/DC50%1/2
not defined $ans or $ans eq ""
not defined $ans
$ans eq ""
Truth table66%2/3
not(A) or B
A= not defined $ansB= $ans eq ""
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 1 | ▶ | sub os_unsupported { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
os_unsupported: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | 1 | die "OS unsupported\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | 81 | ▶ | sub eval_in_subdirs { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
eval_in_subdirs: called CC=7 SCAR=19.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | 81 | my($self) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | 96 | ▶ | use Cwd qw(cwd abs_path); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | 81 | ▶ | my $pwd = cwd() || die "Can't figure out your cwd!"; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
cwd() || die(q[Can't figure out your cwd!])
MC/DC0%0/1
cwd() || die(q[Can't figure out your cwd!])
cwd()
Truth table50%1/2
A
A= cwd()
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | 81 | ▶ | local @INC = map eval {abs_path($_) if -e} || $_, @INC; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
eval {
do {
abs_path($_) if -e $_
}
} || $_
MC/DC0%0/2
eval {
do {
abs_path($_) if -e $_
}
} || $_
eval {
do {
abs_path($_) if -e $_
}
}
$_
Truth table66%2/3
A || B
A= eval {
do {
abs_path($_) if -e $_
}
}B= $_
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | 81 | push @INC, '.'; # '.' has to always be at the end of @INC | |||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | 81 | foreach my $dir (@{$self->{DIR}}){ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | 81 | my($abs) = $self->catdir($pwd,$dir); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | 81 | eval { $self->eval_in_x($abs); }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | 81 | ▶ | last if $@; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 81 | chdir $pwd; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | 81 | ▶ | die $@ if $@; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | 81 | ▶ | sub eval_in_x { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
eval_in_x: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | 81 | my($self,$dir) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | 81 | ▶ | chdir $dir or carp("Couldn't change to directory $dir: $!"); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | 81 | package main; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | 81 | do './Makefile.PL'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | 81 | ▶ | if ($@) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | # if ($@ =~ /prerequisites/) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | # die "MakeMaker WARNING: $@"; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | # } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | # warn "WARNING from evaluation of $dir/Makefile.PL: $@"; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | # } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 1 | die "ERROR from evaluation of $dir/Makefile.PL: $@"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | # package name for the classes into which the first object will be blessed | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | 96 | my $PACKNAME = 'PACK000'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | 96 | ▶ | sub full_setup { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
full_setup: called CC=6 SCAR=18.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 96 | ▶ | $Verbose ||= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$ExtUtils::MakeMaker::Verbose ||= 0
MC/DC0%0/1
$ExtUtils::MakeMaker::Verbose ||= 0
$ExtUtils::MakeMaker::Verbose
Truth table50%1/2
A
A= $ExtUtils::MakeMaker::Verbose
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | 96 | my @dep_macros = qw/ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | PERL_INCDEP PERL_ARCHLIBDEP PERL_ARCHIVEDEP | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | /; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | 96 | my @fs_macros = qw/ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | FULLPERL XSUBPPDIR | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | INSTALLDIRS | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | DESTDIR PREFIX INSTALL_BASE | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | PERLPREFIX SITEPREFIX VENDORPREFIX | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | INSTALLMAN1DIR INSTALLMAN3DIR | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | PERL_LIB PERL_ARCHLIB | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | SITELIBEXP SITEARCHEXP | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | MAKE LIBPERL_A LIB PERL_SRC PERL_INC | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | PPM_INSTALL_EXEC PPM_UNINSTALL_EXEC | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | PPM_INSTALL_SCRIPT PPM_UNINSTALL_SCRIPT | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | /; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | 96 | my @attrib_help = qw/ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DISTVNAME | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | DL_FUNCS DL_VARS | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | FULLPERLRUN FULLPERLRUNINST | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | FUNCLIST H IMPORTS | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | INC INCLUDE_EXT LDFROM LIBS LICENSE | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | LINKTYPE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | META_ADD META_MERGE MIN_PERL_VERSION BUILD_REQUIRES CONFIGURE_REQUIRES | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NO_MYMETA NO_PACKLIST NO_PERLLOCAL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | NORECURS NO_VC OBJECT OPTIMIZE PERL_MALLOC_OK PERL PERLMAINCC PERLRUN | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | PERLRUNINST PERL_CORE | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | PERM_DIR PERM_RW PERM_RWX MAGICXS | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ PUREPERL_ONLY | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST VERSION VERSION_FROM XS | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | XSBUILD XSMULTI XSOPT XSPROTOARG XS_VERSION | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | clean depend dist dynamic_lib linkext macro realclean tool_autosplit | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | MAN1EXT MAN3EXT | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | /; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | 96 | push @attrib_help, @fs_macros; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | 96 | @macro_fsentity{@fs_macros, @dep_macros} = (1) x (@fs_macros+@dep_macros); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | 96 | @macro_dep{@dep_macros} = (1) x @dep_macros; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | # IMPORTS is used under OS/2 and Win32 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | # @Overridable is close to @MM_Sections but not identical. The | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | # order is important. Many subroutines declare macros. These | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | # depend on each other. Let's try to collect the macros up front, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | # then pasthru, then the rules. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | # MM_Sections are the sections we have to call explicitly | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | # in Overridable we have subroutines that are used indirectly | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | 96 | @MM_Sections = | |||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | qw( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | post_initialize const_config constants platform_constants | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | tool_autosplit tool_xsubpp tools_other | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | makemakerdflt | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | dist macro depend cflags const_loadlibs const_cccmd | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | post_constants | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | pasthru | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | special_targets | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | c_o xs_c xs_o | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | top_targets blibdirs linkext dlsyms dynamic_bs dynamic | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | dynamic_lib static static_lib manifypods processPL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | installbin subdirs | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | clean_subdirs clean realclean_subdirs realclean | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | metafile signature | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | dist_basics dist_core distdir dist_test dist_ci distmeta distsignature | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | install force perldepend makefile staticmake test ppd | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | ); # loses section ordering | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | 96 | @Overridable = @MM_Sections; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | 96 | push @Overridable, qw[ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | libscan makeaperl needs_linking | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | subdir_x test_via_harness test_via_script | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | init_VERSION init_dist init_INST init_INSTALL init_DEST init_dirscan | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | init_PM init_MANPODS init_xs init_PERL init_DIRFILESEP init_linker | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | 96 | push @MM_Sections, qw[ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | pm_to_blib selfdocument | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | # Postamble needs to be the last that was always the case | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | 96 | push @MM_Sections, "postamble"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | 96 | push @Overridable, "postamble"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | # All sections are valid keys. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | 96 | @Recognized_Att_Keys{@MM_Sections} = (1) x @MM_Sections; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | # we will use all these variables in the Makefile | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | 96 | @Get_from_Config = | |||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | qw( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | ar cc cccdlflags ccdlflags cpprun dlext dlsrc exe_ext full_ar ld | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | sitelibexp sitearchexp so | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | # 5.5.3 doesn't have any concept of vendor libs | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | 96 | ▶ | push @Get_from_Config, qw( vendorarchexp vendorlibexp ) if "$]" >= 5.006; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | 96 | foreach my $item (@attrib_help){ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | 14496 | $Recognized_Att_Keys{$item} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | 96 | foreach my $item (@Get_from_Config) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | 2208 | $Recognized_Att_Keys{uc $item} = $Config{$item}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | 2208 | ▶ | print "Attribute '\U$item\E' => '$Config{$item}'\n" | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | if ($Verbose >= 2); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | # When we eval a Makefile.PL in a subdirectory, that one will ask | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | # us (the parent) for the values and will prepend "..", so that | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | # all files to be installed end up below OUR ./blib | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | 96 | @Prepend_parent = qw( | |||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | INST_BIN INST_LIB INST_ARCHLIB INST_SCRIPT | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | MAP_TARGET INST_MAN1DIR INST_MAN3DIR PERL_SRC | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | PERL FULLPERL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | 1136 | ▶ | sub _has_cpan_meta_requirements { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_has_cpan_meta_requirements: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | 1136 | return eval { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | 1136 | require CPAN::Meta::Requirements; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | 1066 | CPAN::Meta::Requirements->VERSION(2.130); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | # Make sure vstrings can be handled. Some versions of CMR require B to | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | # do this, which won't be available in miniperl. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | 1066 | CPAN::Meta::Requirements->new->add_string_requirement('Module' => v1.2); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | 1066 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | 228 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=98 SCAR=50.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | 228 | my($class,$self) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | 228 | my($key); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | 228 | ▶ | _convert_compat_attrs($self) if defined $self && $self; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $self and $self
MC/DC0%0/2
defined $self and $self
defined $self
$self
Truth table33%1/3
A and B
A= defined $selfB= $self
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | # Store the original args passed to WriteMakefile() | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | 228 | foreach my $k (keys %$self) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | 774 | $self->{ARGS}{$k} = $self->{$k}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | 228 | ▶ | $self = {} unless defined $self; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | # Temporarily bless it into MM so it can be used as an | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | # object. It will be blessed into a temp package later. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | 228 | bless $self, "MM"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | # Cleanup all the module requirement bits | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | 228 | my %key2cmr; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | 228 | for my $key (qw(PREREQ_PM BUILD_REQUIRES CONFIGURE_REQUIRES TEST_REQUIRES)) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | 912 | ▶ | $self->{$key} ||= {}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$self->{$key} ||= {}
MC/DC100%1/1
$self->{$key} ||= {}
$self->{$key}
Truth table100%2/2
A
A= $self->{$key}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | 912 | ▶ | if (_has_cpan_meta_requirements) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | my $cmr = CPAN::Meta::Requirements->from_string_hash( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | $self->{$key}, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | 3 | ▶ | bad_version_hook => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | #no warnings 'numeric'; # module doesn't use warnings | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | 3 | my $fallback; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | 3 | ▶ | if ( $_[0] =~ m!^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$! ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | 1 | $fallback = sprintf "%f", $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | 2 | ▶ | ($fallback) = $_[0] ? ($_[0] =~ /^([0-9.]+)/) : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | 2 | $fallback += 0; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 469 | 2 | carp "Unparsable version '$_[0]' for prerequisite $_[1] treated as $fallback"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | 3 | version->new($fallback); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 474 | 856 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 475 | 856 | $self->{$key} = $cmr->as_string_hash; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 476 | 856 | $key2cmr{$key} = $cmr; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | 56 | for my $module (sort keys %{ $self->{$key} }) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | 14 | my $version = $self->{$key}->{$module}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | 14 | my $fallback = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 481 | 14 | ▶ | if (!defined($version) or !length($version)) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition100%3/3
defined $version && length $version
MC/DC100%2/2
defined $version && length $version
defined $version
length $version
Truth table100%3/3
A && B
A= defined $versionB= length $version
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | 2 | carp "Undefined requirement for $module treated as '0' (CPAN::Meta::Requirements not available)"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | elsif ($version =~ /^\d+(?:\.\d+(?:_\d+)*)?$/) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | 3 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 486 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | 9 | ▶ | if ( $version =~ m!^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$! ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 489 | 1 | $fallback = sprintf "%f", $version; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 491 | 8 | ▶ | ($fallback) = $version ? ($version =~ /^([0-9.]+)/) : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | 8 | $fallback += 0; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | 8 | carp "Unparsable version '$version' for prerequisite $module treated as $fallback (CPAN::Meta::Requirements not available)"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 496 | 11 | $self->{$key}->{$module} = $fallback; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 499 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 501 | 228 | ▶ | if ("@ARGV" =~ /\bPREREQ_PRINT\b/) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | 2 | $self->_PREREQ_PRINT; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | # PRINT_PREREQ is RedHatism. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | 226 | ▶ | if ("@ARGV" =~ /\bPRINT_PREREQ\b/) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | 2 | $self->_PRINT_PREREQ; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 508 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 509 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 510 | 224 | ▶ | print "MakeMaker (v$VERSION)\n" if $Verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 511 | 224 | ▶ | if (-f "MANIFEST" && ! -f "Makefile" && ! $UNDER_CORE){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%5/6
-f "MANIFEST" and not -f "Makefile" and not $ExtUtils::MakeMaker::UNDER_CORE
-f "MANIFEST" and not -f "Makefile"
MC/DC66%2/3
-f "MANIFEST" and not -f "Makefile" and not $ExtUtils::MakeMaker::UNDER_CORE
-f "MANIFEST"
not -f "Makefile"
not $ExtUtils::MakeMaker::UNDER_CORE
Truth table75%3/4
A and not(B) and not(C)
A= -f "MANIFEST"B= not -f "Makefile"C= not $ExtUtils::MakeMaker::UNDER_CORE
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | 6 | check_manifest(); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 513 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 514 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 515 | 224 | check_hints($self); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | 224 | ▶ | if ( $self->{MIN_PERL_VERSION}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | 9 | my $perl_version = $self->{MIN_PERL_VERSION}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | 9 | ▶ | if (ref $perl_version) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | # assume a version object | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 522 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | 9 | $perl_version = eval { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | 0 | ▶ | local $SIG{__WARN__} = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 525 | # simulate "use warnings FATAL => 'all'" for vintage perls | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | 0 | die @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 527 | 9 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | 9 | my $v = version->new($perl_version); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | # we care about parse issues, not numify warnings | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | 96 | ▶ | no warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | 8 | $v->numify; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | 9 | ▶ | $perl_version =~ tr/_//d | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 534 | if defined $perl_version; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 537 | 9 | ▶ | if (!defined $perl_version) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | # should this be a warning? | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 539 | 1 | die sprintf <<'END', $self->{MIN_PERL_VERSION}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | MakeMaker FATAL: MIN_PERL_VERSION (%s) is not in a recognized format. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | Recommended is a quoted numerical value like '5.005' or '5.008001'. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | END | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | elsif ($perl_version > "$]") { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | 2 | my $message = sprintf <<'END', $perl_version, $]; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | Perl version %s or higher required. We run %s. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | END | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | 2 | ▶ | if ($self->{PREREQ_FATAL}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | 1 | die "MakeMaker FATAL: $message"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 550 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | 1 | warn "Warning: $message"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 556 | 7 | $self->{MIN_PERL_VERSION} = $perl_version; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 557 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 558 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 559 | 222 | my %configure_att; # record &{$self->{CONFIGURE}} attributes | |||||||||||||||||||||||||||||||||||||||||||||||||
| 560 | 222 | my(%initial_att) = %$self; # record initial attributes | |||||||||||||||||||||||||||||||||||||||||||||||||
| 561 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 562 | 222 | my(%unsatisfied) = (); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 563 | 222 | my %prereq2version; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 564 | my $cmr; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 565 | 222 | ▶ | if (_has_cpan_meta_requirements) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 566 | 208 | $cmr = CPAN::Meta::Requirements->new; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | 208 | for my $key (qw(PREREQ_PM BUILD_REQUIRES CONFIGURE_REQUIRES TEST_REQUIRES)) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 568 | 832 | ▶ | $cmr->add_requirements($key2cmr{$key}) if $key2cmr{$key}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 569 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 570 | 208 | foreach my $prereq ($cmr->required_modules) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 571 | 64 | $prereq2version{$prereq} = $cmr->requirements_for_module($prereq); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 572 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 573 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 574 | 14 | for my $key (qw(PREREQ_PM BUILD_REQUIRES CONFIGURE_REQUIRES TEST_REQUIRES)) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 575 | 56 | ▶ | next unless my $module2version = $self->{$key}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 576 | 56 | $prereq2version{$_} = $module2version->{$_} for keys %$module2version; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 577 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 578 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 579 | 222 | foreach my $prereq (sort keys %prereq2version) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 580 | 78 | my $required_version = $prereq2version{$prereq}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 581 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 582 | 78 | my $pr_version = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 583 | 78 | my $installed_file; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 584 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 585 | 78 | ▶ | if ( $prereq eq 'perl' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 586 | 0 | ▶ | if ( defined $required_version && $required_version =~ /^v?[\d_\.]+$/ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
defined $required_version and $required_version =~ /^v?[\d_\.]+$/ or not $required_version =~ /^v?[\d_\.]+$/
defined $required_version and $required_version =~ /^v?[\d_\.]+$/
MC/DC0%0/3
defined $required_version and $required_version =~ /^v?[\d_\.]+$/ or not $required_version =~ /^v?[\d_\.]+$/
defined $required_version
$required_version =~ /^v?[\d_\.]+$/
not $required_version =~ /^v?[\d_\.]+$/
Truth table0%0/5
A and B or not(C)
A= defined $required_versionB= $required_version =~ /^v?[\d_\.]+$/C= not $required_version =~ /^v?[\d_\.]+$/
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 587 | || $required_version !~ /^v?[\d_\.]+$/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 588 | 0 | require version; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 589 | 0 | my $normal = eval { version->new( $required_version ) }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 590 | 0 | ▶ | $required_version = $normal if defined $normal; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 591 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 592 | 0 | $installed_file = $prereq; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 593 | 0 | $pr_version = $]; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 594 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 595 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 596 | 78 | $installed_file = MM->_installed_file_for_module($prereq); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 597 | 78 | ▶ | $pr_version = MM->parse_version($installed_file) if $installed_file; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 598 | 78 | ▶ | $pr_version = 0 if $pr_version eq 'undef'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 599 | 78 | ▶ | if ( !eval { version->new( $pr_version ); 1 } ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 600 | #no warnings 'numeric'; # module doesn't use warnings | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 601 | 0 | my $fallback; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 602 | 0 | ▶ | if ( $pr_version =~ m!^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$! ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 603 | 0 | $fallback = sprintf '%f', $pr_version; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 604 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 605 | 0 | ▶ | ($fallback) = $pr_version ? ($pr_version =~ /^([0-9.]+)/) : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 606 | 0 | $fallback += 0; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 607 | 0 | carp "Unparsable version '$pr_version' for installed prerequisite $prereq treated as $fallback"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 608 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 609 | 0 | $pr_version = $fallback; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 610 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 611 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 612 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 613 | # convert X.Y_Z alpha version #s to X.YZ for easier comparisons | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 614 | 78 | $pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 615 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 616 | 78 | ▶ | if (!$installed_file) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 617 | warn sprintf "Warning: prerequisite %s %s not found.\n", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 618 | $prereq, $required_version | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 619 | unless $self->{PREREQ_FATAL} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 620 | 37 | ▶ | or $UNDER_CORE; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$self->{"PREREQ_FATAL"} or $ExtUtils::MakeMaker::UNDER_CORE
MC/DC50%1/2
$self->{"PREREQ_FATAL"} or $ExtUtils::MakeMaker::UNDER_CORE
$self->{"PREREQ_FATAL"}
$ExtUtils::MakeMaker::UNDER_CORE
Truth table66%2/3
A or B
A= $self->{"PREREQ_FATAL"}B= $ExtUtils::MakeMaker::UNDER_CORE
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 621 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 622 | 37 | $unsatisfied{$prereq} = 'not installed'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 623 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 624 | ▶ | elsif ( | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 625 | $cmr | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 626 | ? !$cmr->accepts_module($prereq, $pr_version) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 627 | : version->new($required_version) > version->new($pr_version) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 628 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 629 | warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 630 | $prereq, $required_version, ($pr_version || 'unknown version') | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 631 | unless $self->{PREREQ_FATAL} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 632 | 3 | ▶ | or $UNDER_CORE; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition60%3/5
$self->{"PREREQ_FATAL"} or $ExtUtils::MakeMaker::UNDER_CORE
$pr_version || 'unknown version'
MC/DC50%1/2
$self->{"PREREQ_FATAL"} or $ExtUtils::MakeMaker::UNDER_CORE
$self->{"PREREQ_FATAL"}
$ExtUtils::MakeMaker::UNDER_CORE
MC/DC0%0/1
$pr_version || 'unknown version'
$pr_version
Truth table66%2/3
A or B
A= $self->{"PREREQ_FATAL"}B= $ExtUtils::MakeMaker::UNDER_CORE
Truth table50%1/2
A
A= $pr_version
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 633 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 634 | 3 | ▶ | $unsatisfied{$prereq} = $required_version || 'unknown version' ; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$required_version || 'unknown version'
MC/DC0%0/1
$required_version || 'unknown version'
$required_version
Truth table50%1/2
A
A= $required_version
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 635 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 636 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 637 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 638 | 222 | ▶ | if (%unsatisfied && $self->{PREREQ_FATAL}){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
%unsatisfied and $self->{"PREREQ_FATAL"}
MC/DC100%2/2
%unsatisfied and $self->{"PREREQ_FATAL"}
%unsatisfied
$self->{"PREREQ_FATAL"}
Truth table100%3/3
A and B
A= %unsatisfiedB= $self->{"PREREQ_FATAL"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 639 | 4 | my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"} | |||||||||||||||||||||||||||||||||||||||||||||||||
| 640 | 2 | sort { lc $a cmp lc $b } keys %unsatisfied; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 641 | 2 | die <<"END"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 642 | MakeMaker FATAL: prerequisites not found. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 643 | $failedprereqs | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 644 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 645 | Please install these modules first and rerun 'perl Makefile.PL'. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 646 | END | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 647 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 648 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 649 | 220 | ▶ | if (defined $self->{CONFIGURE}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 650 | 1 | ▶ | if (ref $self->{CONFIGURE} eq 'CODE') { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 651 | 1 | %configure_att = %{&{$self->{CONFIGURE}}}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 652 | 1 | _convert_compat_attrs(\%configure_att); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 653 | 1 | $self = { %$self, %configure_att }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 654 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 655 | 0 | croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 656 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 657 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 658 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 659 | 220 | my $newclass = ++$PACKNAME; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 660 | 220 | local @Parent = @Parent; # Protect against non-local exits | |||||||||||||||||||||||||||||||||||||||||||||||||
| 661 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 662 | 220 | ▶ | print "Blessing Object into class [$newclass]\n" if $Verbose>=2; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 663 | 220 | mv_all_methods("MY",$newclass); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 664 | 220 | bless $self, $newclass; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 665 | 220 | push @Parent, $self; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 666 | 220 | require ExtUtils::MY; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 667 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 668 | 96 | ▶ | no strict 'refs'; ## no critic; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 669 | 220 | @{"$newclass\:\:ISA"} = 'MM'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 670 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 671 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 672 | 220 | ▶ | if (defined $Parent[-2]){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 673 | 79 | $self->{PARENT} = $Parent[-2]; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 674 | 79 | for my $key (@Prepend_parent) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 675 | 790 | ▶ | next unless defined $self->{PARENT}{$key}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 676 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 677 | # Don't stomp on WriteMakefile() args. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 678 | next if defined $self->{ARGS}{$key} and | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 679 | 711 | ▶ | $self->{ARGS}{$key} eq $self->{$key}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $self->{"ARGS"}{$key} and $self->{"ARGS"}{$key} eq $self->{$key}
MC/DC50%1/2
defined $self->{"ARGS"}{$key} and $self->{"ARGS"}{$key} eq $self->{$key}
defined $self->{"ARGS"}{$key}
$self->{"ARGS"}{$key} eq $self->{$key}
Truth table66%2/3
A and B
A= defined $self->{"ARGS"}{$key}B= $self->{"ARGS"}{$key} eq $self->{$key}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 680 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 681 | 705 | $self->{$key} = $self->{PARENT}{$key}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 682 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 683 | 705 | ▶ | if ($Is_VMS && $key =~ /PERL$/) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$Is_VMS and $key =~ /PERL$/
MC/DC0%0/2
$Is_VMS and $key =~ /PERL$/
$Is_VMS
$key =~ /PERL$/
Truth table33%1/3
A and B
A= $Is_VMSB= $key =~ /PERL$/
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 684 | # PERL or FULLPERL will be a command verb or even a | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 685 | # command with an argument instead of a full file | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 686 | # specification under VMS. So, don't turn the command | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 687 | # into a filespec, but do add a level to the path of | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 688 | # the argument if not already absolute. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 689 | 0 | my @cmd = split /\s+/, $self->{$key}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 690 | 0 | ▶ | $cmd[1] = $self->catfile('[-]',$cmd[1]) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
@cmd < 2 or $self->file_name_is_absolute($cmd[1])
MC/DC0%0/2
@cmd < 2 or $self->file_name_is_absolute($cmd[1])
@cmd < 2
$self->file_name_is_absolute($cmd[1])
Truth table0%0/3
A or B
A= @cmd < 2B= $self->file_name_is_absolute($cmd[1])
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 691 | unless (@cmd < 2) || $self->file_name_is_absolute($cmd[1]); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 692 | 0 | $self->{$key} = join(' ', @cmd); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 693 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 694 | 705 | my $value = $self->{$key}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 695 | # not going to test in FS so only stripping start | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 696 | 705 | ▶ | $value =~ s/^"// if $key =~ /PERL$/; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 697 | 705 | ▶ | $value = $self->catdir("..", $value) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 698 | unless $self->file_name_is_absolute($value); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 699 | 705 | ▶ | $value = qq{"$value} if $key =~ /PERL$/; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 700 | 705 | $self->{$key} = $value; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 701 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 702 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 703 | 79 | ▶ | if ($self->{PARENT}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 704 | 79 | $self->{PARENT}->{CHILDREN}->{$newclass} = $self; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 705 | 79 | foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE AR FULL_AR CC CCFLAGS | |||||||||||||||||||||||||||||||||||||||||||||||||
| 706 | OPTIMIZE LD LDDLFLAGS LDFLAGS PERL_ARCHLIB DESTDIR)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 707 | 1027 | ▶ | if (exists $self->{PARENT}->{$opt} | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
exists $self->{"PARENT"}{$opt} and not exists $self->{$opt}
MC/DC50%1/2
exists $self->{"PARENT"}{$opt} and not exists $self->{$opt}
exists $self->{"PARENT"}{$opt}
not exists $self->{$opt}
Truth table66%2/3
A and not(B)
A= exists $self->{"PARENT"}{$opt}B= not exists $self->{$opt}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 708 | and not exists $self->{$opt}) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 709 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 710 | # inherit, but only if already unspecified | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 711 | 791 | $self->{$opt} = $self->{PARENT}->{$opt}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 712 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 713 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 714 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 715 | 79 | my @fm = grep /^FIRST_MAKEFILE=/, @ARGV; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 716 | 79 | ▶ | parse_args($self,@fm) if @fm; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 717 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 718 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 719 | 141 | ▶ | parse_args($self, _shellwords($ENV{PERL_MM_OPT} || ''),@ARGV); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$ENV{'PERL_MM_OPT'} || ''
MC/DC100%1/1
$ENV{'PERL_MM_OPT'} || ''
$ENV{'PERL_MM_OPT'}
Truth table100%2/2
A
A= $ENV{'PERL_MM_OPT'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 720 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 721 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 722 | # RT#91540 PREREQ_FATAL not recognized on command line | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 723 | 220 | ▶ | if (%unsatisfied && $self->{PREREQ_FATAL}){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
%unsatisfied and $self->{"PREREQ_FATAL"}
MC/DC100%2/2
%unsatisfied and $self->{"PREREQ_FATAL"}
%unsatisfied
$self->{"PREREQ_FATAL"}
Truth table100%3/3
A and B
A= %unsatisfiedB= $self->{"PREREQ_FATAL"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 724 | 1 | my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"} | |||||||||||||||||||||||||||||||||||||||||||||||||
| 725 | 0 | sort { lc $a cmp lc $b } keys %unsatisfied; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 726 | 1 | die <<"END"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 727 | MakeMaker FATAL: prerequisites not found. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 728 | $failedprereqs | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 729 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 730 | Please install these modules first and rerun 'perl Makefile.PL'. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 731 | END | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 732 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 733 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 734 | 219 | ▶ | $self->{NAME} ||= $self->guess_name; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$self->{"NAME"} ||= $self->guess_name
MC/DC0%0/2
$self->{"NAME"} ||= $self->guess_name
$self->{"NAME"}
$self->guess_name
Truth table33%1/3
A ||= B
A= $self->{"NAME"}B= $self->guess_name
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 735 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 736 | warn "Warning: NAME must be a package name\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 737 | 219 | ▶ | unless $self->{NAME} =~ m!^[A-Z_a-z][0-9A-Z_a-z]*(?:::[0-9A-Z_a-z]+)*$!; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 738 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 739 | 219 | ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 740 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 741 | 219 | $self->init_MAKE; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 742 | 219 | $self->init_main; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 743 | 219 | $self->init_VERSION; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 744 | 219 | $self->init_dist; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 745 | 219 | $self->init_INST; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 746 | 219 | $self->init_INSTALL; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 747 | 219 | $self->init_DEST; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 748 | 219 | $self->init_dirscan; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 749 | 219 | $self->init_PM; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 750 | 219 | $self->init_MANPODS; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 751 | 219 | $self->init_xs; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 752 | 219 | $self->init_PERL; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 753 | 219 | $self->init_DIRFILESEP; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 754 | 219 | $self->init_linker; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 755 | 219 | $self->init_ABSTRACT; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 756 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 757 | $self->arch_check( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 758 | $INC{'Config.pm'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 759 | 219 | $self->catfile($Config{'archlibexp'}, "Config.pm") | |||||||||||||||||||||||||||||||||||||||||||||||||
| 760 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 761 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 762 | 219 | $self->init_tools(); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 763 | 219 | $self->init_others(); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 764 | 218 | $self->init_platform(); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 765 | 218 | $self->init_PERM(); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 766 | 218 | my @args = @ARGV; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 767 | 218 | ▶ | @args = map { Encode::decode(locale => $_) } @args if $CAN_DECODE; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 768 | 218 | my($argv) = neatvalue(\@args); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 769 | 218 | $argv =~ s/^\[/(/; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 770 | 218 | $argv =~ s/\]$/)/; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 771 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 772 | 218 | push @{$self->{RESULT}}, <<END; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 773 | # This Makefile is for the $self->{NAME} extension to perl. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 774 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 775 | # It was generated automatically by MakeMaker version | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 776 | # $VERSION (Revision: $Revision) from the contents of | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 777 | # Makefile.PL. Don't edit this file, edit Makefile.PL instead. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 778 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 779 | # ANY CHANGES MADE HERE WILL BE LOST! | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 780 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 781 | # MakeMaker ARGV: $argv | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 782 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 783 | END | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 784 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 785 | 218 | push @{$self->{RESULT}}, $self->_MakeMaker_Parameters_section(\%initial_att); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 786 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 787 | 218 | ▶ | if (defined $self->{CONFIGURE}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 788 | 1 | push @{$self->{RESULT}}, <<END; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 789 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 790 | # MakeMaker 'CONFIGURE' Parameters: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 791 | END | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 792 | 1 | ▶ | if (scalar(keys %configure_att) > 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 793 | 1 | foreach my $key (sort keys %configure_att){ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 794 | 1 | ▶ | next if $key eq 'ARGS'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 795 | 1 | my($v) = neatvalue($configure_att{$key}); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 796 | 1 | $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 797 | 1 | $v =~ tr/\n/ /s; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 798 | 1 | push @{$self->{RESULT}}, "# $key => $v"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 799 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 800 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 801 | else | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 802 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 803 | 0 | push @{$self->{RESULT}}, "# no values returned"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 804 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 805 | 1 | undef %configure_att; # free memory | |||||||||||||||||||||||||||||||||||||||||||||||||
| 806 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 807 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 808 | # turn the SKIP array into a SKIPHASH hash | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 809 | 218 | ▶ | for my $skip (@{$self->{SKIP} || []}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$self->{'SKIP'} || []
MC/DC100%1/1
$self->{'SKIP'} || []
$self->{'SKIP'}
Truth table100%2/2
A
A= $self->{'SKIP'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 810 | 15 | $self->{SKIPHASH}{$skip} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 811 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 812 | 218 | delete $self->{SKIP}; # free memory | |||||||||||||||||||||||||||||||||||||||||||||||||
| 813 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 814 | 218 | ▶ | if ($self->{PARENT}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 815 | 79 | for (qw/install dist dist_basics dist_core distdir dist_test dist_ci/) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 816 | 553 | $self->{SKIPHASH}{$_} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 817 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 818 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 819 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 820 | # We run all the subdirectories now. They don't have much to query | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 821 | # from the parent, but the parent has to query them: if they need linking! | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 822 | 218 | ▶ | unless ($self->{NORECURS}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 823 | 215 | ▶ | $self->eval_in_subdirs if @{$self->{DIR}}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 824 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 825 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 826 | 218 | foreach my $section ( @MM_Sections ){ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 827 | # Support for new foo_target() methods. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 828 | 12155 | my $method = $section; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 829 | 12155 | ▶ | $method .= '_target' unless $self->can($method); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 830 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 831 | 12155 | ▶ | print "Processing Makefile '$section' section\n" if ($Verbose >= 2); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 832 | 12155 | my($skipit) = $self->skipcheck($section); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 833 | 12155 | ▶ | if ($skipit){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 834 | 564 | push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit."; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 835 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 836 | 11591 | ▶ | my(%a) = %{$self->{$section} || {}}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$self->{$section} || {}
MC/DC100%1/1
$self->{$section} || {}
$self->{$section}
Truth table100%2/2
A
A= $self->{$section}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 837 | 11591 | push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 838 | 0 | ▶ | push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$ExtUtils::MakeMaker::Verbose and %a
MC/DC0%0/2
$ExtUtils::MakeMaker::Verbose and %a
$ExtUtils::MakeMaker::Verbose
%a
Truth table33%1/3
A and B
A= $ExtUtils::MakeMaker::VerboseB= %a
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 839 | 11591 | push @{$self->{RESULT}}, $self->maketext_filter( | |||||||||||||||||||||||||||||||||||||||||||||||||
| 840 | $self->$method( %a ) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 841 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 842 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 843 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 844 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 845 | 217 | push @{$self->{RESULT}}, "\n# End."; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 846 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 847 | 217 | $self; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 848 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 849 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 850 | 2 | ▶ | sub WriteEmptyMakefile { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
WriteEmptyMakefile: called CC=9 SCAR=26.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 851 | 2 | ▶ | croak "WriteEmptyMakefile: Need an even number of args" if @_ % 2; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 852 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 853 | 1 | my %att = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 854 | 1 | ▶ | $att{DIR} = [] unless $att{DIR}; # don't recurse by default | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 855 | 1 | my $self = MM->new(\%att); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 856 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 857 | 1 | my $new = $self->{MAKEFILE}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 858 | 1 | my $old = $self->{MAKEFILE_OLD}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 859 | 1 | ▶ | if (-f $old) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 860 | 0 | ▶ | _unlink($old) or warn "unlink $old: $!"; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 861 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 862 | 1 | ▶ | if ( -f $new ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 863 | 0 | ▶ | _rename($new, $old) or warn "rename $new => $old: $!" | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 864 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 865 | 1 | ▶ | open my $mfh, '>', $new or die "open $new for write: $!"; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 866 | 1 | print $mfh <<'EOP'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 867 | all :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 868 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 869 | manifypods : | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 870 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 871 | subdirs :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 872 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 873 | dynamic :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 874 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 875 | static :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 876 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 877 | clean :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 878 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 879 | install :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 880 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 881 | makemakerdflt : | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 882 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 883 | test :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 884 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 885 | test_dynamic :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 886 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 887 | test_static :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 888 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 889 | EOP | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 890 | 1 | ▶ | close $mfh or die "close $new for write: $!"; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 891 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 892 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 893 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 894 | =begin private | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 895 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 896 | =head3 _installed_file_for_module | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 897 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 898 | my $file = MM->_installed_file_for_module($module); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 899 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 900 | Return the first installed .pm $file associated with the $module. The | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 901 | one which will show up when you C<use $module>. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 902 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 903 | $module is something like "strict" or "Test::More". | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 904 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 905 | =end private | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 906 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 907 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 908 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 909 | 82 | ▶ | sub _installed_file_for_module { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_installed_file_for_module: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 910 | 82 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 911 | 82 | my $prereq = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 912 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 913 | 82 | my $file = "$prereq.pm"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 914 | 82 | $file =~ s{::}{/}g; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 915 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 916 | 82 | my $path; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 917 | 82 | for my $dir (@INC) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 918 | 783 | my $tmp = File::Spec->catfile($dir, $file); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 919 | 783 | ▶ | if ( -r $tmp ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 920 | 43 | $path = $tmp; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 921 | 43 | last; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 922 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 923 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 924 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 925 | 82 | return $path; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 926 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 927 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 928 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 929 | # Extracted from MakeMaker->new so we can test it | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 930 | 224 | ▶ | sub _MakeMaker_Parameters_section { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_MakeMaker_Parameters_section: called CC=7 SCAR=19.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 931 | 224 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 932 | 224 | my $att = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 933 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 934 | 224 | my @result = <<'END'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 935 | # MakeMaker Parameters: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 936 | END | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 937 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 938 | 224 | foreach my $key (sort keys %$att){ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 939 | 1757 | ▶ | next if $key eq 'ARGS'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 940 | 1539 | my $v; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 941 | 1539 | ▶ | if ($key eq 'PREREQ_PM') { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 942 | # CPAN.pm takes prereqs from this field in 'Makefile' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 943 | # and does not know about BUILD_REQUIRES | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 944 | $v = neatvalue({ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 945 | 222 | ▶ | %{ $att->{PREREQ_PM} || {} }, | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$att->{'PREREQ_PM'} || {}
MC/DC0%0/1
$att->{'PREREQ_PM'} || {}
$att->{'PREREQ_PM'}
Truth table50%1/2
A
A= $att->{'PREREQ_PM'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 946 | 222 | ▶ | %{ $att->{BUILD_REQUIRES} || {} }, | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$att->{'BUILD_REQUIRES'} || {}
MC/DC100%1/1
$att->{'BUILD_REQUIRES'} || {}
$att->{'BUILD_REQUIRES'}
Truth table100%2/2
A
A= $att->{'BUILD_REQUIRES'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 947 | 222 | ▶ | %{ $att->{TEST_REQUIRES} || {} }, | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$att->{'TEST_REQUIRES'} || {}
MC/DC100%1/1
$att->{'TEST_REQUIRES'} || {}
$att->{'TEST_REQUIRES'}
Truth table100%2/2
A
A= $att->{'TEST_REQUIRES'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 948 | }); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 949 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 950 | 1317 | $v = neatvalue($att->{$key}); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 951 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 952 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 953 | 1539 | $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 954 | 1539 | $v =~ tr/\n/ /s; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 955 | 1539 | push @result, "# $key => $v"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 956 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 957 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 958 | 224 | return @result; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 959 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 960 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 961 | # _shellwords and _parseline borrowed from Text::ParseWords | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 962 | 141 | ▶ | sub _shellwords { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_shellwords: called CC=6 SCAR=18.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 963 | 141 | my (@lines) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 964 | 141 | my @allwords; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 965 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 966 | 141 | foreach my $line (@lines) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 967 | 141 | $line =~ s/^\s+//; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 968 | 141 | my @words = _parse_line('\s+', 0, $line); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 969 | 141 | ▶ | pop @words if (@words and !defined $words[-1]); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@words and not defined $words[-1]
MC/DC0%0/2
@words and not defined $words[-1]
@words
not defined $words[-1]
Truth table66%2/3
A and not(B)
A= @wordsB= not defined $words[-1]
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 970 | 141 | ▶ | return() unless (@words || !length($line)); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@words or not length $line
MC/DC0%0/2
@words or not length $line
@words
not length $line
Truth table66%2/3
A or not(B)
A= @wordsB= not length $line
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 971 | 141 | push(@allwords, @words); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 972 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 973 | 141 | return(@allwords); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 974 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 975 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 976 | 141 | ▶ | sub _parse_line { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_parse_line: called CC=14 SCAR=26.7
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 977 | 141 | my($delimiter, $keep, $line) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 978 | 141 | my($word, @pieces); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 979 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 980 | 96 | ▶ | no warnings 'uninitialized'; # we will be testing undef strings | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 981 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 982 | 141 | ▶ | while (length($line)) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 983 | # This pattern is optimised to be stack conservative on older perls. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 984 | # Do not refactor without being careful and testing it on very long strings. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 985 | # See Perl bug #42980 for an example of a stack busting input. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 986 | 8 | ▶ | $line =~ s/^ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 987 | (?: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 988 | # double quoted string | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 989 | (") # $quote | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 990 | ((?>[^\\"]*(?:\\.[^\\"]*)*))" # $quoted | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 991 | | # --OR-- | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 992 | # singe quoted string | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 993 | (') # $quote | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 994 | ((?>[^\\']*(?:\\.[^\\']*)*))' # $quoted | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 995 | | # --OR-- | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 996 | # unquoted string | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 997 | ( # $unquoted | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 998 | (?:\\.|[^\\"'])*? | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 999 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1000 | # followed by | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1001 | ( # $delim | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1002 | \Z(?!\n) # EOL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1003 | | # --OR-- | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1004 | (?-x:$delimiter) # delimiter | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1005 | | # --OR-- | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1006 | (?!^)(?=["']) # a quote | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1007 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1008 | )//xs or return; # extended layout | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1009 | 8 | ▶ | my ($quote, $quoted, $unquoted, $delim) = (($1 ? ($1,$2) : ($3,$4)), $5, $6); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1010 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1011 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1012 | 8 | ▶ | return() unless( defined($quote) || length($unquoted) || length($delim)); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%5/6
defined $quote or length $unquoted or length $delim
defined $quote or length $unquoted
MC/DC0%0/3
defined $quote or length $unquoted or length $delim
defined $quote
length $unquoted
length $delim
Truth table75%3/4
A or B or C
A= defined $quoteB= length $unquotedC= length $delim
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1013 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1014 | 8 | ▶ | if ($keep) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1015 | 0 | $quoted = "$quote$quoted$quote"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1016 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1017 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1018 | 8 | $unquoted =~ s/\\(.)/$1/sg; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1019 | 8 | ▶ | if (defined $quote) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1020 | 3 | ▶ | $quoted =~ s/\\(.)/$1/sg if ($quote eq '"'); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1021 | #$quoted =~ s/\\([\\'])/$1/g if ( $PERL_SINGLE_QUOTE && $quote eq "'"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1022 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1023 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1024 | 8 | $word .= substr($line, 0, 0); # leave results tainted | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1025 | 8 | ▶ | $word .= defined $quote ? $quoted : $unquoted; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1026 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1027 | 8 | ▶ | if (length($delim)) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1028 | 1 | push(@pieces, $word); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1029 | 1 | ▶ | push(@pieces, $delim) if ($keep eq 'delimiters'); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1030 | 1 | undef $word; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1031 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1032 | 8 | ▶ | if (!length($line)) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1033 | 3 | push(@pieces, $word); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1034 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1035 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1036 | 141 | return(@pieces); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1037 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1038 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1039 | 6 | ▶ | sub check_manifest { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
check_manifest: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1040 | 6 | print STDOUT "Checking if your kit is complete...\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1041 | 6 | require ExtUtils::Manifest; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1042 | # avoid warning | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1043 | 6 | $ExtUtils::Manifest::Quiet = $ExtUtils::Manifest::Quiet = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1044 | 6 | my(@missed) = ExtUtils::Manifest::manicheck(); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1045 | 6 | ▶ | if (@missed) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1046 | 4 | print "Warning: the following files are missing in your kit:\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1047 | 4 | print "\t", join "\n\t", @missed; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1048 | 4 | print "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1049 | 4 | print "Please inform the author.\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1050 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1051 | 2 | print "Looks good\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1052 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1053 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1054 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1055 | 142 | ▶ | sub parse_args{ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse_args: called CC=24 SCAR=48.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1056 | 142 | my($self, @args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1057 | 142 | ▶ | @args = map { Encode::decode(locale => $_) } @args if $CAN_DECODE; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1058 | 142 | foreach (@args) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1059 | 19 | ▶ | unless (m/(.*?)=(.*)/) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1060 | 0 | ▶ | ++$Verbose if m/^verb/; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1061 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1062 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1063 | 19 | my($name, $value) = ($1, $2); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1064 | 19 | ▶ | if ($value =~ m/^~(\w+)?/) { # tilde with optional username | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1065 | 0 | $value =~ s [^~(\w*)] | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1066 | 0 | ▶ | [$1 ? | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/2
(getpwnam $1)[7] or "~$1"
MC/DC0%0/1
(getpwnam $1)[7] or "~$1"
(getpwnam $1)[7]
Truth table0%0/2
A
A= (getpwnam $1)[7]
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1067 | ((getpwnam($1))[7] || "~$1") : | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1068 | (getpwuid($>))[7] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1069 | ]ex; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1070 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1071 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1072 | # Remember the original args passed it. It will be useful later. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1073 | 19 | $self->{ARGS}{uc $name} = $self->{uc $name} = $value; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1074 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1075 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1076 | # catch old-style 'potential_libs' and inform user how to 'upgrade' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1077 | 142 | ▶ | if (defined $self->{potential_libs}){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1078 | 0 | my($msg)="'potential_libs' => '$self->{potential_libs}' should be"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1079 | 0 | ▶ | if ($self->{potential_libs}){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1080 | 0 | print "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1081 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1082 | 0 | print "$msg deleted.\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1083 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1084 | 0 | $self->{LIBS} = [$self->{potential_libs}]; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1085 | 0 | delete $self->{potential_libs}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1086 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1087 | # catch old-style 'ARMAYBE' and inform user how to 'upgrade' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1088 | 142 | ▶ | if (defined $self->{ARMAYBE}){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1089 | 0 | my($armaybe) = $self->{ARMAYBE}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1090 | 0 | print "ARMAYBE => '$armaybe' should be changed to:\n", | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1091 | "\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n"; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1092 | 0 | ▶ | my(%dl) = %{$self->{dynamic_lib} || {}}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->{'dynamic_lib'} || {}
MC/DC0%0/1
$self->{'dynamic_lib'} || {}
$self->{'dynamic_lib'}
Truth table0%0/2
A
A= $self->{'dynamic_lib'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1093 | 0 | $self->{dynamic_lib} = { %dl, ARMAYBE => $armaybe}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1094 | 0 | delete $self->{ARMAYBE}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1095 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1096 | 142 | ▶ | if (defined $self->{LDTARGET}){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1097 | 0 | print "LDTARGET should be changed to LDFROM\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1098 | 0 | $self->{LDFROM} = $self->{LDTARGET}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1099 | 0 | delete $self->{LDTARGET}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1100 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1101 | # Turn a DIR argument on the command line into an array | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1102 | 142 | ▶ | if (defined $self->{DIR} && ref \$self->{DIR} eq 'SCALAR') { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $self->{"DIR"} and ref \$self->{"DIR"} eq "SCALAR"
MC/DC0%0/2
defined $self->{"DIR"} and ref \$self->{"DIR"} eq "SCALAR"
defined $self->{"DIR"}
ref \$self->{"DIR"} eq "SCALAR"
Truth table66%2/3
A and B
A= defined $self->{"DIR"}B= ref \$self->{"DIR"} eq "SCALAR"
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1103 | # So they can choose from the command line, which extensions they want | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1104 | # the grep enables them to have some colons too much in case they | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1105 | # have to build a list with the shell | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1106 | 0 | $self->{DIR} = [grep $_, split ":", $self->{DIR}]; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1107 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1108 | # Turn a INCLUDE_EXT argument on the command line into an array | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1109 | 142 | ▶ | if (defined $self->{INCLUDE_EXT} && ref \$self->{INCLUDE_EXT} eq 'SCALAR') { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $self->{"INCLUDE_EXT"} and ref \$self->{"INCLUDE_EXT"} eq "SCALAR"
MC/DC0%0/2
defined $self->{"INCLUDE_EXT"} and ref \$self->{"INCLUDE_EXT"} eq "SCALAR"
defined $self->{"INCLUDE_EXT"}
ref \$self->{"INCLUDE_EXT"} eq "SCALAR"
Truth table33%1/3
A and B
A= defined $self->{"INCLUDE_EXT"}B= ref \$self->{"INCLUDE_EXT"} eq "SCALAR"
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1110 | 0 | $self->{INCLUDE_EXT} = [grep $_, split '\s+', $self->{INCLUDE_EXT}]; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1111 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1112 | # Turn a EXCLUDE_EXT argument on the command line into an array | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1113 | 142 | ▶ | if (defined $self->{EXCLUDE_EXT} && ref \$self->{EXCLUDE_EXT} eq 'SCALAR') { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $self->{"EXCLUDE_EXT"} and ref \$self->{"EXCLUDE_EXT"} eq "SCALAR"
MC/DC0%0/2
defined $self->{"EXCLUDE_EXT"} and ref \$self->{"EXCLUDE_EXT"} eq "SCALAR"
defined $self->{"EXCLUDE_EXT"}
ref \$self->{"EXCLUDE_EXT"} eq "SCALAR"
Truth table33%1/3
A and B
A= defined $self->{"EXCLUDE_EXT"}B= ref \$self->{"EXCLUDE_EXT"} eq "SCALAR"
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1114 | 0 | $self->{EXCLUDE_EXT} = [grep $_, split '\s+', $self->{EXCLUDE_EXT}]; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1115 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1116 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1117 | 142 | foreach my $mmkey (sort keys %$self){ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1118 | 1167 | ▶ | next if $mmkey eq 'ARGS'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1119 | 1025 | ▶ | print " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1120 | print "'$mmkey' is not a known MakeMaker parameter name.\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1121 | 1025 | ▶ | unless exists $Recognized_Att_Keys{$mmkey}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1122 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1123 | 142 | ▶ | $| = 1 if $Verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1124 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1125 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1126 | 226 | ▶ | sub check_hints { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
check_hints: called CC=6 SCAR=18.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1127 | 226 | my($self) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1128 | # We allow extension-specific hints files. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1129 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1130 | 226 | require File::Spec; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1131 | 226 | my $curdir = File::Spec->curdir; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1132 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1133 | 226 | my $hint_dir = File::Spec->catdir($curdir, "hints"); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1134 | 226 | ▶ | return unless -d $hint_dir; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1135 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1136 | # First we look for the best hintsfile we have | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1137 | 2 | my($hint)="${^O}_$Config{osvers}"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1138 | 2 | $hint =~ s/\./_/g; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1139 | 2 | $hint =~ s/_$//; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1140 | 2 | ▶ | return unless $hint; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1141 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1142 | # Also try without trailing minor version numbers. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1143 | 2 | while (1) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1144 | 8 | ▶ | last if -f File::Spec->catfile($hint_dir, "$hint.pl"); # found | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1145 | } continue { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1146 | 6 | ▶ | last unless $hint =~ s/_[^_]*$//; # nothing to cut off | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1147 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1148 | 2 | my $hint_file = File::Spec->catfile($hint_dir, "$hint.pl"); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1149 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1150 | 2 | ▶ | return unless -f $hint_file; # really there | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1151 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1152 | 2 | _run_hintfile($self, $hint_file); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1153 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1154 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1155 | 2 | ▶ | sub _run_hintfile { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_run_hintfile: called CC=4 SCAR=14.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1156 | 2 | our $self; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1157 | 2 | local($self) = shift; # make $self available to the hint file. | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1158 | 2 | my($hint_file) = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1159 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1160 | 2 | local($@, $!); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1161 | 2 | ▶ | print "Processing hints file $hint_file\n" if $Verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1162 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1163 | # Just in case the ./ isn't on the hint file, which File::Spec can | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1164 | # often strip off, we bung the curdir into @INC | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1165 | 2 | local @INC = (File::Spec->curdir, @INC); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1166 | 2 | my $ret = do $hint_file; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1167 | 2 | ▶ | if( !defined $ret ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1168 | 1 | ▶ | my $error = $@ || $!; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$@ || $!
MC/DC0%0/2
$@ || $!
$@
$!
Truth table33%1/3
A || B
A= $@B= $!
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1169 | 1 | warn $error; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1170 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1171 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1172 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1173 | 220 | ▶ | sub mv_all_methods { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
mv_all_methods: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1174 | 220 | my($from,$to) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1175 | 12 | ▶ | local $SIG{__WARN__} = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1176 | # can't use 'no warnings redefined', 5.6 only | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1177 | 12 | ▶ | warn @_ unless $_[0] =~ /^Subroutine .* redefined/ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1178 | 220 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1179 | 220 | foreach my $method (@Overridable) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1180 | 15840 | ▶ | next unless defined &{"${from}::$method"}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1181 | 96 | ▶ | no strict 'refs'; ## no critic | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1182 | 12 | *{"${to}::$method"} = \&{"${from}::$method"}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1183 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1184 | # If we delete a method, then it will be undefined and cannot | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1185 | # be called. But as long as we have Makefile.PLs that rely on | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1186 | # %MY:: being intact, we have to fill the hole with an | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1187 | # inheriting method: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1188 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1189 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1190 | 12 | package MY; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1191 | 12 | my $super = "SUPER::".$method; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1192 | 12 | ▶ | *{$method} = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1193 | 3 | shift->$super(@_); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1194 | 12 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1195 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1196 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1197 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1198 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1199 | 12155 | ▶ | sub skipcheck { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
skipcheck: called CC=15 SCAR=29.6
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1200 | 12155 | my($self) = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1201 | 12155 | my($section) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1202 | 12155 | ▶ | return 'skipped' if $section eq 'metafile' && $UNDER_CORE; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$section eq "metafile" and $ExtUtils::MakeMaker::UNDER_CORE
MC/DC0%0/2
$section eq "metafile" and $ExtUtils::MakeMaker::UNDER_CORE
$section eq "metafile"
$ExtUtils::MakeMaker::UNDER_CORE
Truth table66%2/3
A and B
A= $section eq "metafile"B= $ExtUtils::MakeMaker::UNDER_CORE
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1203 | 12155 | ▶ | if ($section eq 'dynamic') { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1204 | print "Warning (non-fatal): Target 'dynamic' depends on targets ", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1205 | "in skipped section 'dynamic_bs'\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1206 | 217 | ▶ | if $self->{SKIPHASH}{dynamic_bs} && $Verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$self->{"SKIPHASH"}{"dynamic_bs"} and $ExtUtils::MakeMaker::Verbose
MC/DC0%0/2
$self->{"SKIPHASH"}{"dynamic_bs"} and $ExtUtils::MakeMaker::Verbose
$self->{"SKIPHASH"}{"dynamic_bs"}
$ExtUtils::MakeMaker::Verbose
Truth table33%1/3
A and B
A= $self->{"SKIPHASH"}{"dynamic_bs"}B= $ExtUtils::MakeMaker::Verbose
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1207 | print "Warning (non-fatal): Target 'dynamic' depends on targets ", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1208 | "in skipped section 'dynamic_lib'\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1209 | 217 | ▶ | if $self->{SKIPHASH}{dynamic_lib} && $Verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$self->{"SKIPHASH"}{"dynamic_lib"} and $ExtUtils::MakeMaker::Verbose
MC/DC0%0/2
$self->{"SKIPHASH"}{"dynamic_lib"} and $ExtUtils::MakeMaker::Verbose
$self->{"SKIPHASH"}{"dynamic_lib"}
$ExtUtils::MakeMaker::Verbose
Truth table66%2/3
A and B
A= $self->{"SKIPHASH"}{"dynamic_lib"}B= $ExtUtils::MakeMaker::Verbose
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1210 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1211 | 12155 | ▶ | if ($section eq 'dynamic_lib') { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1212 | print "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1213 | "targets in skipped section 'dynamic_bs'\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1214 | 217 | ▶ | if $self->{SKIPHASH}{dynamic_bs} && $Verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$self->{"SKIPHASH"}{"dynamic_bs"} and $ExtUtils::MakeMaker::Verbose
MC/DC0%0/2
$self->{"SKIPHASH"}{"dynamic_bs"} and $ExtUtils::MakeMaker::Verbose
$self->{"SKIPHASH"}{"dynamic_bs"}
$ExtUtils::MakeMaker::Verbose
Truth table33%1/3
A and B
A= $self->{"SKIPHASH"}{"dynamic_bs"}B= $ExtUtils::MakeMaker::Verbose
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1215 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1216 | 12155 | ▶ | if ($section eq 'static') { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1217 | print "Warning (non-fatal): Target 'static' depends on targets ", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1218 | "in skipped section 'static_lib'\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1219 | 217 | ▶ | if $self->{SKIPHASH}{static_lib} && $Verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$self->{"SKIPHASH"}{"static_lib"} and $ExtUtils::MakeMaker::Verbose
MC/DC0%0/2
$self->{"SKIPHASH"}{"static_lib"} and $ExtUtils::MakeMaker::Verbose
$self->{"SKIPHASH"}{"static_lib"}
$ExtUtils::MakeMaker::Verbose
Truth table66%2/3
A and B
A= $self->{"SKIPHASH"}{"static_lib"}B= $ExtUtils::MakeMaker::Verbose
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1220 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1221 | 12155 | ▶ | return 'skipped' if $self->{SKIPHASH}{$section}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1222 | 11591 | return ''; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1223 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1224 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1225 | # returns filehandle, dies on fail. :raw so no :crlf | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1226 | 214 | ▶ | sub open_for_writing { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
open_for_writing: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1227 | 214 | my ($file) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1228 | 214 | ▶ | open my $fh ,">", $file or die "Unable to open $file: $!"; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1229 | 214 | my @layers = ':raw'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1230 | 214 | ▶ | push @layers, join ' ', ':encoding(locale)' if $CAN_DECODE; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1231 | 214 | binmode $fh, join ' ', @layers; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1232 | 214 | $fh; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1233 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1234 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1235 | 214 | ▶ | sub flush { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
flush: called CC=12 SCAR=25.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1236 | 214 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1237 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1238 | 214 | my $finalname = $self->{MAKEFILE}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1239 | 214 | ▶ | printf STDOUT "Generating a %s %s\n", $self->make_type, $finalname if $Verbose || !$self->{PARENT}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$ExtUtils::MakeMaker::Verbose or not $self->{"PARENT"}
MC/DC50%1/2
$ExtUtils::MakeMaker::Verbose or not $self->{"PARENT"}
$ExtUtils::MakeMaker::Verbose
not $self->{"PARENT"}
Truth table66%2/3
A or not(B)
A= $ExtUtils::MakeMaker::VerboseB= not $self->{"PARENT"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1240 | 214 | ▶ | print STDOUT "Writing $finalname for $self->{NAME}\n" if $Verbose || !$self->{PARENT}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$ExtUtils::MakeMaker::Verbose or not $self->{"PARENT"}
MC/DC50%1/2
$ExtUtils::MakeMaker::Verbose or not $self->{"PARENT"}
$ExtUtils::MakeMaker::Verbose
not $self->{"PARENT"}
Truth table66%2/3
A or not(B)
A= $ExtUtils::MakeMaker::VerboseB= not $self->{"PARENT"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1241 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1242 | 214 | ▶ | unlink($finalname, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : ()); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1243 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1244 | 214 | write_file_via_tmp($finalname, $self->{RESULT}); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1245 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1246 | # Write MYMETA.yml to communicate metadata up to the CPAN clients | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1247 | print STDOUT "Writing MYMETA.yml and MYMETA.json\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1248 | 214 | ▶ | if !$self->{NO_MYMETA} and $self->write_mymeta( $self->mymeta ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
not $self->{"NO_MYMETA"} and $self->write_mymeta($self->mymeta)
MC/DC100%2/2
not $self->{"NO_MYMETA"} and $self->write_mymeta($self->mymeta)
not $self->{"NO_MYMETA"}
$self->write_mymeta($self->mymeta)
Truth table100%3/3
not(A) and B
A= not $self->{"NO_MYMETA"}B= $self->write_mymeta($self->mymeta)
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1249 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1250 | # save memory | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1251 | 214 | ▶ | if ($self->{PARENT} && !$self->{_KEEP_AFTER_FLUSH}) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->{"PARENT"} and not $self->{"_KEEP_AFTER_FLUSH"}
MC/DC100%2/2
$self->{"PARENT"} and not $self->{"_KEEP_AFTER_FLUSH"}
$self->{"PARENT"}
not $self->{"_KEEP_AFTER_FLUSH"}
Truth table100%3/3
A and not(B)
A= $self->{"PARENT"}B= not $self->{"_KEEP_AFTER_FLUSH"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1252 | 9 | my %keep = map { ($_ => 1) } qw(NEEDS_LINKING HAS_LINK_CODE); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1253 | 9 | delete $self->{$_} for grep !$keep{$_}, keys %$self; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1254 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1255 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1256 | system("$Config::Config{eunicefix} $finalname") | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1257 | 214 | ▶ | if $Config::Config{eunicefix} ne ":"; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1258 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1259 | 214 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1260 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1261 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1262 | 214 | ▶ | sub write_file_via_tmp { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
write_file_via_tmp: called CC=10 SCAR=25.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1263 | 214 | my ($finalname, $contents) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1264 | 214 | my $fh = open_for_writing("MakeMaker.tmp"); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1265 | 214 | ▶ | die "write_file_via_tmp: 2nd arg must be ref" unless ref $contents; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1266 | 214 | for my $chunk (@$contents) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1267 | 25550 | my $to_write = $chunk; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1268 | 25550 | ▶ | $to_write = '' unless defined $to_write; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1269 | 25550 | ▶ | utf8::encode $to_write if !$CAN_DECODE && "$]" > 5.008; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not $CAN_DECODE and "$]" > "5.008"
MC/DC0%0/2
not $CAN_DECODE and "$]" > "5.008"
not $CAN_DECODE
"$]" > "5.008"
Truth table33%1/3
not(A) and B
A= not $CAN_DECODEB= "$]" > "5.008"
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1270 | 25550 | ▶ | print $fh "$to_write\n" or die "Can't write to MakeMaker.tmp: $!"; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1271 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1272 | 214 | ▶ | close $fh or die "Can't write to MakeMaker.tmp: $!"; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1273 | 214 | ▶ | _rename("MakeMaker.tmp", $finalname) or | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1274 | warn "rename MakeMaker.tmp => $finalname: $!"; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1275 | 214 | ▶ | chmod 0644, $finalname if !$Is_VMS; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1276 | 214 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1277 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1278 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1279 | # This is a rename for OS's where the target must be unlinked first. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1280 | 214 | ▶ | sub _rename { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_rename: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1281 | 214 | my($src, $dest) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1282 | 214 | _unlink($dest); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1283 | 214 | return rename $src, $dest; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1284 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1285 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1286 | # This is an unlink for OS's where the target must be writable first. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1287 | 214 | ▶ | sub _unlink { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_unlink: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1288 | 214 | my @files = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1289 | 214 | chmod 0666, @files; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1290 | 214 | return unlink @files; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1291 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1292 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1293 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1294 | # The following mkbootstrap() is only for installations that are calling | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1295 | # the pre-4.1 mkbootstrap() from their old Makefiles. This MakeMaker | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1296 | # writes Makefiles, that use ExtUtils::Mkbootstrap directly. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1297 | 0 | ▶ | sub mkbootstrap { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
mkbootstrap: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1298 | 0 | die <<END; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1299 | !!! Your Makefile has been built such a long time ago, !!! | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1300 | !!! that is unlikely to work with current MakeMaker. !!! | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1301 | !!! Please rebuild your Makefile !!! | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1302 | END | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1303 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1304 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1305 | # Ditto for mksymlists() as of MakeMaker 5.17 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1306 | 0 | ▶ | sub mksymlists { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
mksymlists: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1307 | 0 | die <<END; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1308 | !!! Your Makefile has been built such a long time ago, !!! | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1309 | !!! that is unlikely to work with current MakeMaker. !!! | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1310 | !!! Please rebuild your Makefile !!! | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1311 | END | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1312 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1313 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1314 | 1882 | ▶ | sub neatvalue { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
neatvalue: called CC=8 SCAR=20.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1315 | 1882 | my($v) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1316 | 1882 | ▶ | return "undef" unless defined $v; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1317 | 1874 | my($t) = ref $v; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1318 | 1874 | ▶ | return "q[$v]" unless $t; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1319 | 1195 | ▶ | if ($t eq 'ARRAY') { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1320 | 295 | my(@m, @neat); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1321 | 295 | push @m, "["; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1322 | 295 | foreach my $elem (@$v) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1323 | 106 | push @neat, "q[$elem]"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1324 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1325 | 295 | push @m, join ", ", @neat; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1326 | 295 | push @m, "]"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1327 | 295 | return join "", @m; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1328 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1329 | 900 | ▶ | return $v unless $t eq 'HASH'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1330 | 895 | my(@m, $key, $val); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1331 | 895 | for my $key (sort keys %$v) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1332 | 124 | ▶ | last unless defined $key; # cautious programming in case (undef,undef) is true | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1333 | 124 | push @m,"$key=>".neatvalue($v->{$key}); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1334 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1335 | 895 | return "{ ".join(', ',@m)." }"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1336 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1337 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1338 | 217 | ▶ | sub selfdocument { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
selfdocument: called CC=5 SCAR=24.7
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1339 | 217 | my($self) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1340 | 217 | my(@m); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1341 | 217 | ▶ | if ($Verbose){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1342 | 0 | push @m, "\n# Full list of MakeMaker attribute values:"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1343 | 0 | foreach my $key (sort keys %$self){ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1344 | 0 | ▶ | next if $key eq 'RESULT' || $key =~ /^[A-Z][a-z]/; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$key eq "RESULT" or $key =~ /^[A-Z][a-z]/
MC/DC0%0/2
$key eq "RESULT" or $key =~ /^[A-Z][a-z]/
$key eq "RESULT"
$key =~ /^[A-Z][a-z]/
Truth table0%0/3
A or B
A= $key eq "RESULT"B= $key =~ /^[A-Z][a-z]/
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1345 | 0 | my($v) = neatvalue($self->{$key}); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1346 | 0 | $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1347 | 0 | $v =~ tr/\n/ /s; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1348 | 0 | push @m, "# $key => $v"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1349 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1350 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1351 | # added here as selfdocument is not overridable | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1352 | 217 | push @m, <<'EOF'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1353 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1354 | # here so even if top_targets is overridden, these will still be defined | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1355 | # gmake will silently still work if any are .PHONY-ed but nmake won't | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1356 | EOF | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1357 | push @m, join "\n", map "$_ ::\n\t\$(NOECHO) \$(NOOP)\n", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1358 | qw(test_static test_dynamic), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1359 | # config is so manifypods won't puke if no subdirs | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1360 | 217 | grep !$self->{SKIPHASH}{$_}, | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1361 | qw(static dynamic config); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1362 | 217 | join "\n", @m; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1363 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 1364 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1365 | 96 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1366 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 1367 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||