| Filename | C:/tmp64ng/perl/lib/ExtUtils/MakeMaker.pm |
| Statements | Executed 6187 statements in 15.6ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::BEGIN@10 |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::BEGIN@1091 |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::BEGIN@11 |
| 1 | 1 | 1 | 0s | 31.2ms | ExtUtils::MakeMaker::BEGIN@12 |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::BEGIN@220 |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::BEGIN@4 |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::BEGIN@577 |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::BEGIN@6 |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::BEGIN@873 |
| 1 | 1 | 1 | 0s | 109ms | ExtUtils::MakeMaker::BEGIN@9 |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:binmode (opcode) |
| 3 | 2 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:chdir (opcode) |
| 6 | 2 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:chmod (opcode) |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:close (opcode) |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:ftdir (opcode) |
| 4 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:ftfile (opcode) |
| 5 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:ftis (opcode) |
| 48 | 6 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:match (opcode) |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:open (opcode) |
| 371 | 6 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:print (opcode) |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:rename (opcode) |
| 30 | 4 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:sort (opcode) |
| 47 | 8 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:subst (opcode) |
| 6 | 2 | 1 | 0s | 0s | ExtUtils::MakeMaker::CORE:unlink (opcode) |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::WriteEmptyMakefile |
| 3 | 2 | 2 | 0s | 62.3s | ExtUtils::MakeMaker::WriteMakefile (recurses: max depth 1, inclusive time 38.6s) |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::_MakeMaker_Parameters_section |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::__ANON__[:1077] |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::__ANON__[:1303] |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::__ANON__[:455] |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::__ANON__[:471] |
| 6 | 2 | 1 | 0s | 0s | ExtUtils::MakeMaker::_convert_compat_attrs |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::_find_magic_vstring |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::_format_att |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::_installed_file_for_module |
| 21 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::_is_of_type |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::_parse_line |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::_rename |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::_run_hintfile |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::_shellwords |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::_unlink |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::_verify_att |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::check_hints |
| 1 | 1 | 1 | 0s | 31.2ms | ExtUtils::MakeMaker::check_manifest |
| 12 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::clean_versions |
| 1 | 1 | 1 | 0s | 38.6s | ExtUtils::MakeMaker::eval_in_subdirs |
| 2 | 1 | 1 | 0s | 38.6s | ExtUtils::MakeMaker::eval_in_x |
| 3 | 1 | 1 | 0s | 125ms | ExtUtils::MakeMaker::flush |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::full_setup |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::mkbootstrap |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::mksymlists |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::mv_all_methods |
| 52 | 5 | 2 | 0s | 0s | ExtUtils::MakeMaker::neatvalue (recurses: max depth 3, inclusive time 0s) |
| 3 | 1 | 1 | 0s | 62.2s | ExtUtils::MakeMaker::new (recurses: max depth 1, inclusive time 38.6s) |
| 1 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::parse_args |
| 0 | 0 | 0 | 0s | 0s | ExtUtils::MakeMaker::prompt |
| 3 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::selfdocument |
| 168 | 1 | 1 | 0s | 0s | ExtUtils::MakeMaker::skipcheck |
| 0 | 0 | 0 | 0s | 0s | MY::__ANON__[:1104] |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # $Id$ | ||||
| 2 | package ExtUtils::MakeMaker; | ||||
| 3 | |||||
| 4 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MakeMaker::BEGIN@4 which was called:
# once (0s+0s) by main::BEGIN@1 at line 4 # spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@4
# spent 0s making 1 call to strict::import |
| 5 | |||||
| 6 | 1 | 0s | 1 | 0s | # spent 0s within ExtUtils::MakeMaker::BEGIN@6 which was called:
# once (0s+0s) by main::BEGIN@1 at line 6 # spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@6 |
| 7 | |||||
| 8 | 1 | 0s | require Exporter; | ||
| 9 | 2 | 0s | 2 | 109ms | # spent 109ms (0s+109) within ExtUtils::MakeMaker::BEGIN@9 which was called:
# once (0s+109ms) by main::BEGIN@1 at line 9 # spent 109ms making 1 call to ExtUtils::MakeMaker::BEGIN@9
# spent 0s making 1 call to ExtUtils::MakeMaker::Config::import |
| 10 | 2 | 0s | 1 | 0s | # spent 0s within ExtUtils::MakeMaker::BEGIN@10 which was called:
# once (0s+0s) by main::BEGIN@1 at line 10 # spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@10 |
| 11 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MakeMaker::BEGIN@11 which was called:
# once (0s+0s) by main::BEGIN@1 at line 11 # spent 0s making 1 call to Exporter::import
# spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@11 |
| 12 | 2 | 0s | 2 | 31.2ms | # spent 31.2ms (0s+31.2) within ExtUtils::MakeMaker::BEGIN@12 which was called:
# once (0s+31.2ms) by main::BEGIN@1 at line 12 # spent 31.2ms making 1 call to ExtUtils::MakeMaker::BEGIN@12
# spent 0s making 1 call to Exporter::import |
| 13 | 2 | 0s | my $CAN_DECODE = eval { require ExtUtils::MakeMaker::Locale; }; # 2 birds, 1 stone | ||
| 14 | 1 | 0s | eval { ExtUtils::MakeMaker::Locale::reinit('UTF-8') } | ||
| 15 | if $CAN_DECODE and $ExtUtils::MakeMaker::Locale::ENCODING_LOCALE eq 'US-ASCII'; | ||||
| 16 | |||||
| 17 | 1 | 0s | our $Verbose = 0; # exported | ||
| 18 | 1 | 0s | our @Parent; # needs to be localized | ||
| 19 | 1 | 0s | our @Get_from_Config; # referenced by MM_Unix | ||
| 20 | 1 | 0s | our @MM_Sections; | ||
| 21 | 1 | 0s | our @Overridable; | ||
| 22 | 1 | 0s | my @Prepend_parent; | ||
| 23 | my %Recognized_Att_Keys; | ||||
| 24 | 1 | 0s | our %macro_fsentity; # whether a macro is a filesystem name | ||
| 25 | 1 | 0s | our %macro_dep; # whether a macro is a dependency | ||
| 26 | |||||
| 27 | 1 | 0s | our $VERSION = '7.04'; | ||
| 28 | 1 | 0s | $VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] # spent 0s executing statements in string eval | ||
| 29 | |||||
| 30 | # Emulate something resembling CVS $Revision$ | ||||
| 31 | 1 | 0s | 1 | 0s | (our $Revision = $VERSION) =~ s{_}{}; # spent 0s making 1 call to ExtUtils::MakeMaker::CORE:subst |
| 32 | 1 | 0s | $Revision = int $Revision * 10000; | ||
| 33 | |||||
| 34 | 1 | 0s | our $Filename = __FILE__; # referenced outside MakeMaker | ||
| 35 | |||||
| 36 | 1 | 0s | our @ISA = qw(Exporter); | ||
| 37 | 1 | 0s | our @EXPORT = qw(&WriteMakefile $Verbose &prompt); | ||
| 38 | 1 | 0s | our @EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists | ||
| 39 | &WriteEmptyMakefile); | ||||
| 40 | |||||
| 41 | # These will go away once the last of the Win32 & VMS specific code is | ||||
| 42 | # purged. | ||||
| 43 | 1 | 0s | my $Is_VMS = $^O eq 'VMS'; | ||
| 44 | 1 | 0s | my $Is_Win32 = $^O eq 'MSWin32'; | ||
| 45 | 1 | 0s | my $UNDER_CORE = $ENV{PERL_CORE}; | ||
| 46 | |||||
| 47 | 1 | 0s | 1 | 0s | full_setup(); # spent 0s making 1 call to ExtUtils::MakeMaker::full_setup |
| 48 | |||||
| 49 | 1 | 0s | require ExtUtils::MM; # Things like CPAN assume loading ExtUtils::MakeMaker | ||
| 50 | # will give them MM. | ||||
| 51 | |||||
| 52 | 1 | 0s | require ExtUtils::MY; # XXX pre-5.8 versions of ExtUtils::Embed expect | ||
| 53 | # loading ExtUtils::MakeMaker will give them MY. | ||||
| 54 | # This will go when Embed is its own CPAN module. | ||||
| 55 | |||||
| 56 | |||||
| 57 | # spent 62.3s (0+62.3) within ExtUtils::MakeMaker::WriteMakefile which was called 3 times, avg 20.8s/call:
# 2 times (0s+0s) by ExtUtils::MakeMaker::eval_in_x at line 11 of Prec/Makefile.PL, avg 0s/call
# once (0s+62.3s) by main::RUNTIME at line 116 of Makefile.PL | ||||
| 58 | 3 | 0s | croak "WriteMakefile: Need even number of args" if @_ % 2; | ||
| 59 | |||||
| 60 | 3 | 0s | require ExtUtils::MY; | ||
| 61 | 3 | 0s | my %att = @_; | ||
| 62 | |||||
| 63 | 3 | 0s | 3 | 0s | _convert_compat_attrs(\%att); # spent 0s making 3 calls to ExtUtils::MakeMaker::_convert_compat_attrs, avg 0s/call |
| 64 | |||||
| 65 | 3 | 0s | 3 | 0s | _verify_att(\%att); # spent 0s making 3 calls to ExtUtils::MakeMaker::_verify_att, avg 0s/call |
| 66 | |||||
| 67 | 3 | 0s | 3 | 62.2s | my $mm = MM->new(\%att); # spent 101s making 3 calls to ExtUtils::MakeMaker::new, avg 33.6s/call, recursion: max depth 1, sum of overlapping time 38.6s |
| 68 | 3 | 0s | 3 | 125ms | $mm->flush; # spent 125ms making 3 calls to ExtUtils::MakeMaker::flush, avg 41.6ms/call |
| 69 | |||||
| 70 | 3 | 0s | return $mm; | ||
| 71 | } | ||||
| 72 | |||||
| 73 | |||||
| 74 | # Basic signatures of the attributes WriteMakefile takes. Each is the | ||||
| 75 | # reference type. Empty value indicate it takes a non-reference | ||||
| 76 | # scalar. | ||||
| 77 | 1 | 0s | my %Att_Sigs; | ||
| 78 | 1 | 0s | my %Special_Sigs = ( | ||
| 79 | AUTHOR => 'ARRAY', | ||||
| 80 | C => 'ARRAY', | ||||
| 81 | CONFIG => 'ARRAY', | ||||
| 82 | CONFIGURE => 'CODE', | ||||
| 83 | DIR => 'ARRAY', | ||||
| 84 | DL_FUNCS => 'HASH', | ||||
| 85 | DL_VARS => 'ARRAY', | ||||
| 86 | EXCLUDE_EXT => 'ARRAY', | ||||
| 87 | EXE_FILES => 'ARRAY', | ||||
| 88 | FUNCLIST => 'ARRAY', | ||||
| 89 | H => 'ARRAY', | ||||
| 90 | IMPORTS => 'HASH', | ||||
| 91 | INCLUDE_EXT => 'ARRAY', | ||||
| 92 | LIBS => ['ARRAY',''], | ||||
| 93 | MAN1PODS => 'HASH', | ||||
| 94 | MAN3PODS => 'HASH', | ||||
| 95 | META_ADD => 'HASH', | ||||
| 96 | META_MERGE => 'HASH', | ||||
| 97 | OBJECT => ['ARRAY', ''], | ||||
| 98 | PL_FILES => 'HASH', | ||||
| 99 | PM => 'HASH', | ||||
| 100 | PMLIBDIRS => 'ARRAY', | ||||
| 101 | PMLIBPARENTDIRS => 'ARRAY', | ||||
| 102 | PREREQ_PM => 'HASH', | ||||
| 103 | BUILD_REQUIRES => 'HASH', | ||||
| 104 | CONFIGURE_REQUIRES => 'HASH', | ||||
| 105 | TEST_REQUIRES => 'HASH', | ||||
| 106 | SKIP => 'ARRAY', | ||||
| 107 | TYPEMAPS => 'ARRAY', | ||||
| 108 | XS => 'HASH', | ||||
| 109 | VERSION => ['version',''], | ||||
| 110 | _KEEP_AFTER_FLUSH => '', | ||||
| 111 | |||||
| 112 | clean => 'HASH', | ||||
| 113 | depend => 'HASH', | ||||
| 114 | dist => 'HASH', | ||||
| 115 | dynamic_lib=> 'HASH', | ||||
| 116 | linkext => 'HASH', | ||||
| 117 | macro => 'HASH', | ||||
| 118 | postamble => 'HASH', | ||||
| 119 | realclean => 'HASH', | ||||
| 120 | test => 'HASH', | ||||
| 121 | tool_autosplit => 'HASH', | ||||
| 122 | ); | ||||
| 123 | |||||
| 124 | 1 | 0s | @Att_Sigs{keys %Recognized_Att_Keys} = ('') x keys %Recognized_Att_Keys; | ||
| 125 | 1 | 0s | @Att_Sigs{keys %Special_Sigs} = values %Special_Sigs; | ||
| 126 | |||||
| 127 | sub _convert_compat_attrs { #result of running several times should be same | ||||
| 128 | 6 | 0s | my($att) = @_; | ||
| 129 | 6 | 0s | if (exists $att->{AUTHOR}) { | ||
| 130 | 2 | 0s | if ($att->{AUTHOR}) { | ||
| 131 | 2 | 0s | if (!ref($att->{AUTHOR})) { | ||
| 132 | 1 | 0s | my $t = $att->{AUTHOR}; | ||
| 133 | 1 | 0s | $att->{AUTHOR} = [$t]; | ||
| 134 | } | ||||
| 135 | } else { | ||||
| 136 | $att->{AUTHOR} = []; | ||||
| 137 | } | ||||
| 138 | } | ||||
| 139 | } | ||||
| 140 | |||||
| 141 | # spent 0s within ExtUtils::MakeMaker::_verify_att which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::WriteMakefile at line 65, avg 0s/call | ||||
| 142 | 3 | 0s | my($att) = @_; | ||
| 143 | |||||
| 144 | 3 | 0s | while( my($key, $val) = each %$att ) { | ||
| 145 | 18 | 0s | my $sig = $Att_Sigs{$key}; | ||
| 146 | 18 | 0s | unless( defined $sig ) { | ||
| 147 | warn "WARNING: $key is not a known parameter.\n"; | ||||
| 148 | next; | ||||
| 149 | } | ||||
| 150 | |||||
| 151 | 18 | 0s | my @sigs = ref $sig ? @$sig : $sig; | ||
| 152 | 18 | 0s | my $given = ref $val; | ||
| 153 | 39 | 0s | 21 | 0s | unless( grep { _is_of_type($val, $_) } @sigs ) { # spent 0s making 21 calls to ExtUtils::MakeMaker::_is_of_type, avg 0s/call |
| 154 | my $takes = join " or ", map { _format_att($_) } @sigs; | ||||
| 155 | |||||
| 156 | my $has = _format_att($given); | ||||
| 157 | warn "WARNING: $key takes a $takes not a $has.\n". | ||||
| 158 | " Please inform the author.\n"; | ||||
| 159 | } | ||||
| 160 | } | ||||
| 161 | } | ||||
| 162 | |||||
| 163 | |||||
| 164 | # Check if a given thing is a reference or instance of $type | ||||
| 165 | # spent 0s within ExtUtils::MakeMaker::_is_of_type which was called 21 times, avg 0s/call:
# 21 times (0s+0s) by ExtUtils::MakeMaker::_verify_att at line 153, avg 0s/call | ||||
| 166 | 21 | 0s | my($thing, $type) = @_; | ||
| 167 | |||||
| 168 | 21 | 0s | return 1 if ref $thing eq $type; | ||
| 169 | |||||
| 170 | 3 | 0s | local $SIG{__DIE__}; | ||
| 171 | 6 | 0s | 2 | 0s | return 1 if eval{ $thing->isa($type) }; # spent 0s making 2 calls to UNIVERSAL::isa, avg 0s/call |
| 172 | |||||
| 173 | 3 | 0s | return 0; | ||
| 174 | } | ||||
| 175 | |||||
| 176 | |||||
| 177 | sub _format_att { | ||||
| 178 | my $given = shift; | ||||
| 179 | |||||
| 180 | return $given eq '' ? "string/number" | ||||
| 181 | : uc $given eq $given ? "$given reference" | ||||
| 182 | : "$given object" | ||||
| 183 | ; | ||||
| 184 | } | ||||
| 185 | |||||
| 186 | |||||
| 187 | sub prompt ($;$) { ## no critic | ||||
| 188 | my($mess, $def) = @_; | ||||
| 189 | confess("prompt function called without an argument") | ||||
| 190 | unless defined $mess; | ||||
| 191 | |||||
| 192 | my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ; | ||||
| 193 | |||||
| 194 | my $dispdef = defined $def ? "[$def] " : " "; | ||||
| 195 | $def = defined $def ? $def : ""; | ||||
| 196 | |||||
| 197 | local $|=1; | ||||
| 198 | local $\; | ||||
| 199 | print "$mess $dispdef"; | ||||
| 200 | |||||
| 201 | my $ans; | ||||
| 202 | if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) { | ||||
| 203 | print "$def\n"; | ||||
| 204 | } | ||||
| 205 | else { | ||||
| 206 | $ans = <STDIN>; | ||||
| 207 | if( defined $ans ) { | ||||
| 208 | $ans =~ s{\015?\012$}{}; | ||||
| 209 | } | ||||
| 210 | else { # user hit ctrl-D | ||||
| 211 | print "\n"; | ||||
| 212 | } | ||||
| 213 | } | ||||
| 214 | |||||
| 215 | return (!defined $ans || $ans eq '') ? $def : $ans; | ||||
| 216 | } | ||||
| 217 | |||||
| 218 | # spent 38.6s (0+38.6) within ExtUtils::MakeMaker::eval_in_subdirs which was called:
# once (0s+38.6s) by ExtUtils::MakeMaker::new at line 728 | ||||
| 219 | 1 | 0s | my($self) = @_; | ||
| 220 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MakeMaker::BEGIN@220 which was called:
# once (0s+0s) by main::BEGIN@1 at line 220 # spent 0s making 1 call to Exporter::import
# spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@220 |
| 221 | 1 | 0s | 1 | 0s | my $pwd = cwd() || die "Can't figure out your cwd!"; # spent 0s making 1 call to Cwd::_win32_cwd |
| 222 | |||||
| 223 | 6 | 0s | 10 | 0s | local @INC = map eval {abs_path($_) if -e} || $_, @INC; # spent 0s making 5 calls to Cwd::fast_abs_path, avg 0s/call
# spent 0s making 5 calls to ExtUtils::MakeMaker::CORE:ftis, avg 0s/call |
| 224 | 1 | 0s | push @INC, '.'; # '.' has to always be at the end of @INC | ||
| 225 | |||||
| 226 | 1 | 0s | foreach my $dir (@{$self->{DIR}}){ | ||
| 227 | 2 | 0s | 2 | 0s | my($abs) = $self->catdir($pwd,$dir); # spent 0s making 2 calls to File::Spec::Win32::catdir, avg 0s/call |
| 228 | 4 | 0s | 2 | 38.6s | eval { $self->eval_in_x($abs); }; # spent 38.6s making 2 calls to ExtUtils::MakeMaker::eval_in_x, avg 19.3s/call |
| 229 | 2 | 0s | last if $@; | ||
| 230 | } | ||||
| 231 | 1 | 0s | 1 | 0s | chdir $pwd; # spent 0s making 1 call to ExtUtils::MakeMaker::CORE:chdir |
| 232 | 1 | 0s | die $@ if $@; | ||
| 233 | } | ||||
| 234 | |||||
| 235 | # spent 38.6s (0+38.6) within ExtUtils::MakeMaker::eval_in_x which was called 2 times, avg 19.3s/call:
# 2 times (0s+38.6s) by ExtUtils::MakeMaker::eval_in_subdirs at line 228, avg 19.3s/call | ||||
| 236 | 2 | 0s | my($self,$dir) = @_; | ||
| 237 | 2 | 0s | 2 | 0s | chdir $dir or carp("Couldn't change to directory $dir: $!"); # spent 0s making 2 calls to ExtUtils::MakeMaker::CORE:chdir, avg 0s/call |
| 238 | |||||
| 239 | { | ||||
| 240 | 2 | 0s | package main; | ||
| 241 | 2 | 0s | do './Makefile.PL'; | ||
| 242 | }; | ||||
| 243 | 2 | 0s | if ($@) { | ||
| 244 | # if ($@ =~ /prerequisites/) { | ||||
| 245 | # die "MakeMaker WARNING: $@"; | ||||
| 246 | # } else { | ||||
| 247 | # warn "WARNING from evaluation of $dir/Makefile.PL: $@"; | ||||
| 248 | # } | ||||
| 249 | die "ERROR from evaluation of $dir/Makefile.PL: $@"; | ||||
| 250 | } | ||||
| 251 | } | ||||
| 252 | |||||
| 253 | |||||
| 254 | # package name for the classes into which the first object will be blessed | ||||
| 255 | 1 | 0s | my $PACKNAME = 'PACK000'; | ||
| 256 | |||||
| 257 | # spent 0s within ExtUtils::MakeMaker::full_setup which was called:
# once (0s+0s) by main::BEGIN@1 at line 47 | ||||
| 258 | 1 | 0s | $Verbose ||= 0; | ||
| 259 | |||||
| 260 | 1 | 0s | my @dep_macros = qw/ | ||
| 261 | PERL_INCDEP PERL_ARCHLIBDEP PERL_ARCHIVEDEP | ||||
| 262 | /; | ||||
| 263 | |||||
| 264 | 1 | 0s | my @fs_macros = qw/ | ||
| 265 | FULLPERL XSUBPPDIR | ||||
| 266 | |||||
| 267 | INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR | ||||
| 268 | INSTALLDIRS | ||||
| 269 | DESTDIR PREFIX INSTALL_BASE | ||||
| 270 | PERLPREFIX SITEPREFIX VENDORPREFIX | ||||
| 271 | INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB | ||||
| 272 | INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH | ||||
| 273 | INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN | ||||
| 274 | INSTALLMAN1DIR INSTALLMAN3DIR | ||||
| 275 | INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR | ||||
| 276 | INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR | ||||
| 277 | INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT | ||||
| 278 | PERL_LIB PERL_ARCHLIB | ||||
| 279 | SITELIBEXP SITEARCHEXP | ||||
| 280 | |||||
| 281 | MAKE LIBPERL_A LIB PERL_SRC PERL_INC | ||||
| 282 | PPM_INSTALL_EXEC PPM_UNINSTALL_EXEC | ||||
| 283 | PPM_INSTALL_SCRIPT PPM_UNINSTALL_SCRIPT | ||||
| 284 | /; | ||||
| 285 | |||||
| 286 | 1 | 0s | my @attrib_help = qw/ | ||
| 287 | |||||
| 288 | AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION | ||||
| 289 | C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DISTVNAME | ||||
| 290 | DL_FUNCS DL_VARS | ||||
| 291 | EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE | ||||
| 292 | FULLPERLRUN FULLPERLRUNINST | ||||
| 293 | FUNCLIST H IMPORTS | ||||
| 294 | |||||
| 295 | INC INCLUDE_EXT LDFROM LIBS LICENSE | ||||
| 296 | LINKTYPE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET | ||||
| 297 | META_ADD META_MERGE MIN_PERL_VERSION BUILD_REQUIRES CONFIGURE_REQUIRES | ||||
| 298 | MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NO_MYMETA NO_PACKLIST NO_PERLLOCAL | ||||
| 299 | NORECURS NO_VC OBJECT OPTIMIZE PERL_MALLOC_OK PERL PERLMAINCC PERLRUN | ||||
| 300 | PERLRUNINST PERL_CORE | ||||
| 301 | PERM_DIR PERM_RW PERM_RWX MAGICXS | ||||
| 302 | PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE | ||||
| 303 | PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ | ||||
| 304 | SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST VERSION VERSION_FROM XS XSOPT XSPROTOARG | ||||
| 305 | XS_VERSION clean depend dist dynamic_lib linkext macro realclean | ||||
| 306 | tool_autosplit | ||||
| 307 | |||||
| 308 | MAN1EXT MAN3EXT | ||||
| 309 | |||||
| 310 | MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC | ||||
| 311 | MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED | ||||
| 312 | /; | ||||
| 313 | 1 | 0s | push @attrib_help, @fs_macros; | ||
| 314 | 1 | 0s | @macro_fsentity{@fs_macros, @dep_macros} = (1) x (@fs_macros+@dep_macros); | ||
| 315 | 1 | 0s | @macro_dep{@dep_macros} = (1) x @dep_macros; | ||
| 316 | |||||
| 317 | # IMPORTS is used under OS/2 and Win32 | ||||
| 318 | |||||
| 319 | # @Overridable is close to @MM_Sections but not identical. The | ||||
| 320 | # order is important. Many subroutines declare macros. These | ||||
| 321 | # depend on each other. Let's try to collect the macros up front, | ||||
| 322 | # then pasthru, then the rules. | ||||
| 323 | |||||
| 324 | # MM_Sections are the sections we have to call explicitly | ||||
| 325 | # in Overridable we have subroutines that are used indirectly | ||||
| 326 | |||||
| 327 | |||||
| 328 | 1 | 0s | @MM_Sections = | ||
| 329 | qw( | ||||
| 330 | |||||
| 331 | post_initialize const_config constants platform_constants | ||||
| 332 | tool_autosplit tool_xsubpp tools_other | ||||
| 333 | |||||
| 334 | makemakerdflt | ||||
| 335 | |||||
| 336 | dist macro depend cflags const_loadlibs const_cccmd | ||||
| 337 | post_constants | ||||
| 338 | |||||
| 339 | pasthru | ||||
| 340 | |||||
| 341 | special_targets | ||||
| 342 | c_o xs_c xs_o | ||||
| 343 | top_targets blibdirs linkext dlsyms dynamic_bs dynamic | ||||
| 344 | dynamic_lib static static_lib manifypods processPL | ||||
| 345 | installbin subdirs | ||||
| 346 | clean_subdirs clean realclean_subdirs realclean | ||||
| 347 | metafile signature | ||||
| 348 | dist_basics dist_core distdir dist_test dist_ci distmeta distsignature | ||||
| 349 | install force perldepend makefile staticmake test ppd | ||||
| 350 | |||||
| 351 | ); # loses section ordering | ||||
| 352 | |||||
| 353 | 1 | 0s | @Overridable = @MM_Sections; | ||
| 354 | 1 | 0s | push @Overridable, qw[ | ||
| 355 | |||||
| 356 | libscan makeaperl needs_linking | ||||
| 357 | subdir_x test_via_harness test_via_script | ||||
| 358 | |||||
| 359 | init_VERSION init_dist init_INST init_INSTALL init_DEST init_dirscan | ||||
| 360 | init_PM init_MANPODS init_xs init_PERL init_DIRFILESEP init_linker | ||||
| 361 | ]; | ||||
| 362 | |||||
| 363 | 1 | 0s | push @MM_Sections, qw[ | ||
| 364 | |||||
| 365 | pm_to_blib selfdocument | ||||
| 366 | |||||
| 367 | ]; | ||||
| 368 | |||||
| 369 | # Postamble needs to be the last that was always the case | ||||
| 370 | 1 | 0s | push @MM_Sections, "postamble"; | ||
| 371 | 1 | 0s | push @Overridable, "postamble"; | ||
| 372 | |||||
| 373 | # All sections are valid keys. | ||||
| 374 | 1 | 0s | @Recognized_Att_Keys{@MM_Sections} = (1) x @MM_Sections; | ||
| 375 | |||||
| 376 | # we will use all these variables in the Makefile | ||||
| 377 | 1 | 0s | @Get_from_Config = | ||
| 378 | qw( | ||||
| 379 | ar cc cccdlflags ccdlflags dlext dlsrc exe_ext full_ar ld | ||||
| 380 | lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib | ||||
| 381 | sitelibexp sitearchexp so | ||||
| 382 | ); | ||||
| 383 | |||||
| 384 | # 5.5.3 doesn't have any concept of vendor libs | ||||
| 385 | 1 | 0s | push @Get_from_Config, qw( vendorarchexp vendorlibexp ) if $] >= 5.006; | ||
| 386 | |||||
| 387 | 1 | 0s | foreach my $item (@attrib_help){ | ||
| 388 | 148 | 0s | $Recognized_Att_Keys{$item} = 1; | ||
| 389 | } | ||||
| 390 | 1 | 0s | foreach my $item (@Get_from_Config) { | ||
| 391 | 22 | 0s | $Recognized_Att_Keys{uc $item} = $Config{$item}; | ||
| 392 | 22 | 0s | print "Attribute '\U$item\E' => '$Config{$item}'\n" | ||
| 393 | if ($Verbose >= 2); | ||||
| 394 | } | ||||
| 395 | |||||
| 396 | # | ||||
| 397 | # When we eval a Makefile.PL in a subdirectory, that one will ask | ||||
| 398 | # us (the parent) for the values and will prepend "..", so that | ||||
| 399 | # all files to be installed end up below OUR ./blib | ||||
| 400 | # | ||||
| 401 | 1 | 0s | @Prepend_parent = qw( | ||
| 402 | INST_BIN INST_LIB INST_ARCHLIB INST_SCRIPT | ||||
| 403 | MAP_TARGET INST_MAN1DIR INST_MAN3DIR PERL_SRC | ||||
| 404 | PERL FULLPERL | ||||
| 405 | ); | ||||
| 406 | } | ||||
| 407 | |||||
| 408 | # spent 62.2s (0+62.2) within ExtUtils::MakeMaker::new which was called 3 times, avg 20.7s/call:
# 3 times (0s+62.2s) by ExtUtils::MakeMaker::WriteMakefile at line 67, avg 20.7s/call | ||||
| 409 | 3 | 0s | my($class,$self) = @_; | ||
| 410 | 3 | 0s | my($key); | ||
| 411 | |||||
| 412 | 3 | 0s | 3 | 0s | _convert_compat_attrs($self) if defined $self && $self; # spent 0s making 3 calls to ExtUtils::MakeMaker::_convert_compat_attrs, avg 0s/call |
| 413 | |||||
| 414 | # Store the original args passed to WriteMakefile() | ||||
| 415 | 3 | 0s | foreach my $k (keys %$self) { | ||
| 416 | 18 | 0s | $self->{ARGS}{$k} = $self->{$k}; | ||
| 417 | } | ||||
| 418 | |||||
| 419 | 3 | 0s | $self = {} unless defined $self; | ||
| 420 | |||||
| 421 | # Temporarily bless it into MM so it can be used as an | ||||
| 422 | # object. It will be blessed into a temp package later. | ||||
| 423 | 3 | 0s | bless $self, "MM"; | ||
| 424 | |||||
| 425 | # Cleanup all the module requirement bits | ||||
| 426 | 3 | 0s | for my $key (qw(PREREQ_PM BUILD_REQUIRES CONFIGURE_REQUIRES TEST_REQUIRES)) { | ||
| 427 | 12 | 0s | $self->{$key} ||= {}; | ||
| 428 | 12 | 0s | 12 | 0s | $self->clean_versions( $key ); # spent 0s making 12 calls to ExtUtils::MakeMaker::clean_versions, avg 0s/call |
| 429 | } | ||||
| 430 | |||||
| 431 | |||||
| 432 | 3 | 0s | 3 | 0s | if ("@ARGV" =~ /\bPREREQ_PRINT\b/) { # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:match, avg 0s/call |
| 433 | $self->_PREREQ_PRINT; | ||||
| 434 | } | ||||
| 435 | |||||
| 436 | # PRINT_PREREQ is RedHatism. | ||||
| 437 | 3 | 0s | 3 | 0s | if ("@ARGV" =~ /\bPRINT_PREREQ\b/) { # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:match, avg 0s/call |
| 438 | $self->_PRINT_PREREQ; | ||||
| 439 | } | ||||
| 440 | |||||
| 441 | 3 | 0s | print "MakeMaker (v$VERSION)\n" if $Verbose; | ||
| 442 | 3 | 0s | 5 | 31.2ms | if (-f "MANIFEST" && ! -f "Makefile" && ! $ENV{PERL_CORE}){ # spent 31.2ms making 1 call to ExtUtils::MakeMaker::check_manifest
# spent 0s making 4 calls to ExtUtils::MakeMaker::CORE:ftfile, avg 0s/call |
| 443 | check_manifest(); | ||||
| 444 | } | ||||
| 445 | |||||
| 446 | 3 | 0s | 3 | 0s | check_hints($self); # spent 0s making 3 calls to ExtUtils::MakeMaker::check_hints, avg 0s/call |
| 447 | |||||
| 448 | 3 | 0s | if ( defined $self->{MIN_PERL_VERSION} | ||
| 449 | && $self->{MIN_PERL_VERSION} !~ /^v?[\d_\.]+$/ ) { | ||||
| 450 | require version; | ||||
| 451 | my $normal = eval { | ||||
| 452 | local $SIG{__WARN__} = sub { | ||||
| 453 | # simulate "use warnings FATAL => 'all'" for vintage perls | ||||
| 454 | die @_; | ||||
| 455 | }; | ||||
| 456 | version->new( $self->{MIN_PERL_VERSION} ) | ||||
| 457 | }; | ||||
| 458 | $self->{MIN_PERL_VERSION} = $normal if defined $normal && !$@; | ||||
| 459 | } | ||||
| 460 | |||||
| 461 | # Translate X.Y.Z to X.00Y00Z | ||||
| 462 | 3 | 0s | if( defined $self->{MIN_PERL_VERSION} ) { | ||
| 463 | $self->{MIN_PERL_VERSION} =~ s{ ^v? (\d+) \. (\d+) \. (\d+) $ } | ||||
| 464 | {sprintf "%d.%03d%03d", $1, $2, $3}ex; | ||||
| 465 | } | ||||
| 466 | |||||
| 467 | 3 | 0s | my $perl_version_ok = eval { | ||
| 468 | local $SIG{__WARN__} = sub { | ||||
| 469 | # simulate "use warnings FATAL => 'all'" for vintage perls | ||||
| 470 | die @_; | ||||
| 471 | 3 | 0s | }; | ||
| 472 | 3 | 0s | !$self->{MIN_PERL_VERSION} or $self->{MIN_PERL_VERSION} <= $] | ||
| 473 | }; | ||||
| 474 | 3 | 0s | if (!$perl_version_ok) { | ||
| 475 | if (!defined $perl_version_ok) { | ||||
| 476 | die <<'END'; | ||||
| 477 | Warning: MIN_PERL_VERSION is not in a recognized format. | ||||
| 478 | Recommended is a quoted numerical value like '5.005' or '5.008001'. | ||||
| 479 | END | ||||
| 480 | } | ||||
| 481 | elsif ($self->{PREREQ_FATAL}) { | ||||
| 482 | die sprintf <<"END", $self->{MIN_PERL_VERSION}, $]; | ||||
| 483 | MakeMaker FATAL: perl version too low for this distribution. | ||||
| 484 | Required is %s. We run %s. | ||||
| 485 | END | ||||
| 486 | } | ||||
| 487 | else { | ||||
| 488 | warn sprintf | ||||
| 489 | "Warning: Perl version %s or higher required. We run %s.\n", | ||||
| 490 | $self->{MIN_PERL_VERSION}, $]; | ||||
| 491 | } | ||||
| 492 | } | ||||
| 493 | |||||
| 494 | 3 | 0s | my %configure_att; # record &{$self->{CONFIGURE}} attributes | ||
| 495 | 3 | 0s | my(%initial_att) = %$self; # record initial attributes | ||
| 496 | |||||
| 497 | 3 | 0s | my(%unsatisfied) = (); | ||
| 498 | 3 | 0s | 3 | 0s | my $prereqs = $self->_all_prereqs; # spent 0s making 3 calls to ExtUtils::MM_Any::_all_prereqs, avg 0s/call |
| 499 | 3 | 0s | 3 | 0s | foreach my $prereq (sort keys %$prereqs) { # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:sort, avg 0s/call |
| 500 | my $required_version = $prereqs->{$prereq}; | ||||
| 501 | |||||
| 502 | my $pr_version = 0; | ||||
| 503 | my $installed_file; | ||||
| 504 | |||||
| 505 | if ( $prereq eq 'perl' ) { | ||||
| 506 | if ( defined $required_version && $required_version =~ /^v?[\d_\.]+$/ | ||||
| 507 | || $required_version !~ /^v?[\d_\.]+$/ ) { | ||||
| 508 | require version; | ||||
| 509 | my $normal = eval { version->new( $required_version ) }; | ||||
| 510 | $required_version = $normal if defined $normal; | ||||
| 511 | } | ||||
| 512 | $installed_file = $prereq; | ||||
| 513 | $pr_version = $]; | ||||
| 514 | } | ||||
| 515 | else { | ||||
| 516 | $installed_file = MM->_installed_file_for_module($prereq); | ||||
| 517 | $pr_version = MM->parse_version($installed_file) if $installed_file; | ||||
| 518 | $pr_version = 0 if $pr_version eq 'undef'; | ||||
| 519 | } | ||||
| 520 | |||||
| 521 | # convert X.Y_Z alpha version #s to X.YZ for easier comparisons | ||||
| 522 | $pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/; | ||||
| 523 | |||||
| 524 | if (!$installed_file) { | ||||
| 525 | warn sprintf "Warning: prerequisite %s %s not found.\n", | ||||
| 526 | $prereq, $required_version | ||||
| 527 | unless $self->{PREREQ_FATAL} | ||||
| 528 | or $ENV{PERL_CORE}; | ||||
| 529 | |||||
| 530 | $unsatisfied{$prereq} = 'not installed'; | ||||
| 531 | } | ||||
| 532 | elsif ($pr_version < $required_version ){ | ||||
| 533 | warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n", | ||||
| 534 | $prereq, $required_version, ($pr_version || 'unknown version') | ||||
| 535 | unless $self->{PREREQ_FATAL} | ||||
| 536 | or $ENV{PERL_CORE}; | ||||
| 537 | |||||
| 538 | $unsatisfied{$prereq} = $required_version ? $required_version : 'unknown version' ; | ||||
| 539 | } | ||||
| 540 | } | ||||
| 541 | |||||
| 542 | 3 | 0s | if (%unsatisfied && $self->{PREREQ_FATAL}){ | ||
| 543 | my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"} | ||||
| 544 | sort { $a cmp $b } keys %unsatisfied; | ||||
| 545 | die <<"END"; | ||||
| 546 | MakeMaker FATAL: prerequisites not found. | ||||
| 547 | $failedprereqs | ||||
| 548 | |||||
| 549 | Please install these modules first and rerun 'perl Makefile.PL'. | ||||
| 550 | END | ||||
| 551 | } | ||||
| 552 | |||||
| 553 | 3 | 0s | if (defined $self->{CONFIGURE}) { | ||
| 554 | if (ref $self->{CONFIGURE} eq 'CODE') { | ||||
| 555 | %configure_att = %{&{$self->{CONFIGURE}}}; | ||||
| 556 | _convert_compat_attrs(\%configure_att); | ||||
| 557 | $self = { %$self, %configure_att }; | ||||
| 558 | } else { | ||||
| 559 | croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n"; | ||||
| 560 | } | ||||
| 561 | } | ||||
| 562 | |||||
| 563 | # This is for old Makefiles written pre 5.00, will go away | ||||
| 564 | 3 | 0s | 6 | 0s | if ( Carp::longmess("") =~ /runsubdirpl/s ){ # spent 0s making 3 calls to Carp::longmess, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:match, avg 0s/call |
| 565 | carp("WARNING: Please rerun 'perl Makefile.PL' to regenerate your Makefiles\n"); | ||||
| 566 | } | ||||
| 567 | |||||
| 568 | 3 | 0s | my $newclass = ++$PACKNAME; | ||
| 569 | 3 | 0s | local @Parent = @Parent; # Protect against non-local exits | ||
| 570 | { | ||||
| 571 | 6 | 0s | print "Blessing Object into class [$newclass]\n" if $Verbose>=2; | ||
| 572 | 3 | 0s | 3 | 0s | mv_all_methods("MY",$newclass); # spent 0s making 3 calls to ExtUtils::MakeMaker::mv_all_methods, avg 0s/call |
| 573 | 3 | 0s | bless $self, $newclass; | ||
| 574 | 3 | 0s | push @Parent, $self; | ||
| 575 | 3 | 0s | require ExtUtils::MY; | ||
| 576 | |||||
| 577 | 2 | 15.6ms | 2 | 0s | # spent 0s within ExtUtils::MakeMaker::BEGIN@577 which was called:
# once (0s+0s) by main::BEGIN@1 at line 577 # spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@577
# spent 0s making 1 call to strict::unimport |
| 578 | 3 | 0s | @{"$newclass\:\:ISA"} = 'MM'; | ||
| 579 | } | ||||
| 580 | |||||
| 581 | 3 | 0s | if (defined $Parent[-2]){ | ||
| 582 | 2 | 0s | $self->{PARENT} = $Parent[-2]; | ||
| 583 | 2 | 0s | for my $key (@Prepend_parent) { | ||
| 584 | 20 | 0s | next unless defined $self->{PARENT}{$key}; | ||
| 585 | |||||
| 586 | # Don't stomp on WriteMakefile() args. | ||||
| 587 | 18 | 0s | next if defined $self->{ARGS}{$key} and | ||
| 588 | $self->{ARGS}{$key} eq $self->{$key}; | ||||
| 589 | |||||
| 590 | 18 | 0s | $self->{$key} = $self->{PARENT}{$key}; | ||
| 591 | |||||
| 592 | 18 | 0s | if ($Is_VMS && $key =~ /PERL$/) { | ||
| 593 | # PERL or FULLPERL will be a command verb or even a | ||||
| 594 | # command with an argument instead of a full file | ||||
| 595 | # specification under VMS. So, don't turn the command | ||||
| 596 | # into a filespec, but do add a level to the path of | ||||
| 597 | # the argument if not already absolute. | ||||
| 598 | my @cmd = split /\s+/, $self->{$key}; | ||||
| 599 | $cmd[1] = $self->catfile('[-]',$cmd[1]) | ||||
| 600 | unless (@cmd < 2) || $self->file_name_is_absolute($cmd[1]); | ||||
| 601 | $self->{$key} = join(' ', @cmd); | ||||
| 602 | } else { | ||||
| 603 | 18 | 0s | my $value = $self->{$key}; | ||
| 604 | # not going to test in FS so only stripping start | ||||
| 605 | 18 | 0s | 22 | 0s | $value =~ s/^"// if $key =~ /PERL$/; # spent 0s making 18 calls to ExtUtils::MakeMaker::CORE:match, avg 0s/call
# spent 0s making 4 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call |
| 606 | 18 | 0s | 32 | 0s | $value = $self->catdir("..", $value) # spent 0s making 14 calls to File::Spec::Win32::catdir, avg 0s/call
# spent 0s making 18 calls to File::Spec::Win32::file_name_is_absolute, avg 0s/call |
| 607 | unless $self->file_name_is_absolute($value); | ||||
| 608 | 18 | 0s | 18 | 0s | $value = qq{"$value} if $key =~ /PERL$/; # spent 0s making 18 calls to ExtUtils::MakeMaker::CORE:match, avg 0s/call |
| 609 | 18 | 0s | $self->{$key} = $value; | ||
| 610 | } | ||||
| 611 | } | ||||
| 612 | 2 | 0s | if ($self->{PARENT}) { | ||
| 613 | 2 | 0s | $self->{PARENT}->{CHILDREN}->{$newclass} = $self; | ||
| 614 | 2 | 0s | foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE LD OPTIMIZE)) { | ||
| 615 | 10 | 0s | if (exists $self->{PARENT}->{$opt} | ||
| 616 | and not exists $self->{$opt}) | ||||
| 617 | { | ||||
| 618 | # inherit, but only if already unspecified | ||||
| 619 | $self->{$opt} = $self->{PARENT}->{$opt}; | ||||
| 620 | } | ||||
| 621 | } | ||||
| 622 | } | ||||
| 623 | 2 | 0s | my @fm = grep /^FIRST_MAKEFILE=/, @ARGV; | ||
| 624 | 2 | 0s | parse_args($self,@fm) if @fm; | ||
| 625 | } | ||||
| 626 | else { | ||||
| 627 | 1 | 0s | 2 | 0s | parse_args($self, _shellwords($ENV{PERL_MM_OPT} || ''),@ARGV); # spent 0s making 1 call to ExtUtils::MakeMaker::_shellwords
# spent 0s making 1 call to ExtUtils::MakeMaker::parse_args |
| 628 | } | ||||
| 629 | |||||
| 630 | # RT#91540 PREREQ_FATAL not recognized on command line | ||||
| 631 | 3 | 0s | if (%unsatisfied && $self->{PREREQ_FATAL}){ | ||
| 632 | my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"} | ||||
| 633 | sort { $a cmp $b } keys %unsatisfied; | ||||
| 634 | die <<"END"; | ||||
| 635 | MakeMaker FATAL: prerequisites not found. | ||||
| 636 | $failedprereqs | ||||
| 637 | |||||
| 638 | Please install these modules first and rerun 'perl Makefile.PL'. | ||||
| 639 | END | ||||
| 640 | } | ||||
| 641 | |||||
| 642 | 3 | 0s | $self->{NAME} ||= $self->guess_name; | ||
| 643 | |||||
| 644 | 3 | 0s | 3 | 0s | warn "Warning: NAME must be a package name\n" # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:match, avg 0s/call |
| 645 | unless $self->{NAME} =~ m!^[A-Z_a-z][0-9A-Z_a-z]*(?:::[0-9A-Z_a-z]+)*$!; | ||||
| 646 | |||||
| 647 | 3 | 0s | 3 | 0s | ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call |
| 648 | |||||
| 649 | 3 | 0s | 3 | 0s | $self->init_MAKE; # spent 0s making 3 calls to ExtUtils::MM_Any::init_MAKE, avg 0s/call |
| 650 | 3 | 0s | 3 | 0s | $self->init_main; # spent 0s making 3 calls to ExtUtils::MM_Unix::init_main, avg 0s/call |
| 651 | 3 | 0s | 3 | 15.6ms | $self->init_VERSION; # spent 15.6ms making 3 calls to ExtUtils::MM_Any::init_VERSION, avg 5.20ms/call |
| 652 | 3 | 0s | 3 | 0s | $self->init_dist; # spent 0s making 3 calls to ExtUtils::MM_Unix::init_dist, avg 0s/call |
| 653 | 3 | 0s | 3 | 0s | $self->init_INST; # spent 0s making 3 calls to ExtUtils::MM_Any::init_INST, avg 0s/call |
| 654 | 3 | 0s | 3 | 0s | $self->init_INSTALL; # spent 0s making 3 calls to ExtUtils::MM_Any::init_INSTALL, avg 0s/call |
| 655 | 3 | 0s | 3 | 0s | $self->init_DEST; # spent 0s making 3 calls to ExtUtils::MM_Unix::init_DEST, avg 0s/call |
| 656 | 3 | 0s | 3 | 0s | $self->init_dirscan; # spent 0s making 3 calls to ExtUtils::MM_Unix::init_dirscan, avg 0s/call |
| 657 | 3 | 0s | 3 | 0s | $self->init_PM; # spent 0s making 3 calls to ExtUtils::MM_Unix::init_PM, avg 0s/call |
| 658 | 3 | 0s | 3 | 0s | $self->init_MANPODS; # spent 0s making 3 calls to ExtUtils::MM_Unix::init_MANPODS, avg 0s/call |
| 659 | 3 | 0s | 3 | 15.6ms | $self->init_xs; # spent 15.6ms making 3 calls to ExtUtils::MM_Unix::init_xs, avg 5.20ms/call |
| 660 | 3 | 0s | 3 | 93.6ms | $self->init_PERL; # spent 93.6ms making 3 calls to ExtUtils::MM_Unix::init_PERL, avg 31.2ms/call |
| 661 | 3 | 0s | 3 | 1.11s | $self->init_DIRFILESEP; # spent 1.11s making 3 calls to ExtUtils::MM_Win32::init_DIRFILESEP, avg 369ms/call |
| 662 | 3 | 0s | 3 | 0s | $self->init_linker; # spent 0s making 3 calls to ExtUtils::MM_Win32::init_linker, avg 0s/call |
| 663 | 3 | 0s | 3 | 0s | $self->init_ABSTRACT; # spent 0s making 3 calls to ExtUtils::MM_Any::init_ABSTRACT, avg 0s/call |
| 664 | |||||
| 665 | 3 | 0s | 6 | 0s | $self->arch_check( # spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Win32::arch_check, avg 0s/call |
| 666 | $INC{'Config.pm'}, | ||||
| 667 | $self->catfile($Config{'archlibexp'}, "Config.pm") | ||||
| 668 | ); | ||||
| 669 | |||||
| 670 | 3 | 0s | 3 | 10.4s | $self->init_tools(); # spent 10.4s making 3 calls to ExtUtils::MM_Win32::init_tools, avg 3.46s/call |
| 671 | 3 | 0s | 3 | 46.8ms | $self->init_others(); # spent 46.8ms making 3 calls to ExtUtils::MM_Win32::init_others, avg 15.6ms/call |
| 672 | 3 | 0s | 3 | 0s | $self->init_platform(); # spent 0s making 3 calls to ExtUtils::MM_Win32::init_platform, avg 0s/call |
| 673 | 3 | 0s | 3 | 0s | $self->init_PERM(); # spent 0s making 3 calls to ExtUtils::MM_Unix::init_PERM, avg 0s/call |
| 674 | 3 | 0s | 3 | 0s | my($argv) = neatvalue(\@ARGV); # spent 0s making 3 calls to ExtUtils::MakeMaker::neatvalue, avg 0s/call |
| 675 | 3 | 0s | 3 | 0s | $argv =~ s/^\[/(/; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call |
| 676 | 3 | 0s | 3 | 0s | $argv =~ s/\]$/)/; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call |
| 677 | |||||
| 678 | 3 | 0s | push @{$self->{RESULT}}, <<END; | ||
| 679 | # This Makefile is for the $self->{NAME} extension to perl. | ||||
| 680 | # | ||||
| 681 | # It was generated automatically by MakeMaker version | ||||
| 682 | # $VERSION (Revision: $Revision) from the contents of | ||||
| 683 | # Makefile.PL. Don't edit this file, edit Makefile.PL instead. | ||||
| 684 | # | ||||
| 685 | # ANY CHANGES MADE HERE WILL BE LOST! | ||||
| 686 | # | ||||
| 687 | # MakeMaker ARGV: $argv | ||||
| 688 | # | ||||
| 689 | END | ||||
| 690 | |||||
| 691 | 3 | 0s | 3 | 0s | push @{$self->{RESULT}}, $self->_MakeMaker_Parameters_section(\%initial_att); # spent 0s making 3 calls to ExtUtils::MakeMaker::_MakeMaker_Parameters_section, avg 0s/call |
| 692 | |||||
| 693 | 3 | 0s | if (defined $self->{CONFIGURE}) { | ||
| 694 | push @{$self->{RESULT}}, <<END; | ||||
| 695 | |||||
| 696 | # MakeMaker 'CONFIGURE' Parameters: | ||||
| 697 | END | ||||
| 698 | if (scalar(keys %configure_att) > 0) { | ||||
| 699 | foreach my $key (sort keys %configure_att){ | ||||
| 700 | next if $key eq 'ARGS'; | ||||
| 701 | my($v) = neatvalue($configure_att{$key}); | ||||
| 702 | $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/; | ||||
| 703 | $v =~ tr/\n/ /s; | ||||
| 704 | push @{$self->{RESULT}}, "# $key => $v"; | ||||
| 705 | } | ||||
| 706 | } | ||||
| 707 | else | ||||
| 708 | { | ||||
| 709 | push @{$self->{RESULT}}, "# no values returned"; | ||||
| 710 | } | ||||
| 711 | undef %configure_att; # free memory | ||||
| 712 | } | ||||
| 713 | |||||
| 714 | # turn the SKIP array into a SKIPHASH hash | ||||
| 715 | 3 | 0s | for my $skip (@{$self->{SKIP} || []}) { | ||
| 716 | $self->{SKIPHASH}{$skip} = 1; | ||||
| 717 | } | ||||
| 718 | 3 | 0s | delete $self->{SKIP}; # free memory | ||
| 719 | |||||
| 720 | 3 | 0s | if ($self->{PARENT}) { | ||
| 721 | for (qw/install dist dist_basics dist_core distdir dist_test dist_ci/) { | ||||
| 722 | 14 | 0s | $self->{SKIPHASH}{$_} = 1; | ||
| 723 | } | ||||
| 724 | } | ||||
| 725 | |||||
| 726 | # We run all the subdirectories now. They don't have much to query | ||||
| 727 | # from the parent, but the parent has to query them: if they need linking! | ||||
| 728 | 3 | 0s | 1 | 38.6s | unless ($self->{NORECURS}) { # spent 38.6s making 1 call to ExtUtils::MakeMaker::eval_in_subdirs |
| 729 | $self->eval_in_subdirs if @{$self->{DIR}}; | ||||
| 730 | } | ||||
| 731 | |||||
| 732 | 3 | 0s | foreach my $section ( @MM_Sections ){ | ||
| 733 | # Support for new foo_target() methods. | ||||
| 734 | 168 | 0s | my $method = $section; | ||
| 735 | 168 | 0s | 168 | 0s | $method .= '_target' unless $self->can($method); # spent 0s making 168 calls to UNIVERSAL::can, avg 0s/call |
| 736 | |||||
| 737 | 168 | 0s | print "Processing Makefile '$section' section\n" if ($Verbose >= 2); | ||
| 738 | 168 | 0s | 168 | 0s | my($skipit) = $self->skipcheck($section); # spent 0s making 168 calls to ExtUtils::MakeMaker::skipcheck, avg 0s/call |
| 739 | 168 | 0s | if ($skipit){ | ||
| 740 | push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit."; | ||||
| 741 | } else { | ||||
| 742 | 154 | 0s | my(%a) = %{$self->{$section} || {}}; | ||
| 743 | 154 | 0s | push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:"; | ||
| 744 | 154 | 0s | push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a; | ||
| 745 | 154 | 0s | 308 | 50.5s | push @{$self->{RESULT}}, $self->maketext_filter( # spent 35.4s making 3 calls to ExtUtils::MM_Any::metafile_target, avg 11.8s/call
# spent 4.45s making 3 calls to ExtUtils::MM_Unix::ppd, avg 1.48s/call
# spent 2.22s making 3 calls to ExtUtils::MM_Any::distmeta_target, avg 738ms/call
# spent 2.22s making 3 calls to ExtUtils::MM_Any::distsignature_target, avg 738ms/call
# spent 920ms making 3 calls to ExtUtils::MM_Unix::test, avg 307ms/call
# spent 749ms making 3 calls to ExtUtils::MM_Any::realclean_subdirs_target, avg 250ms/call
# spent 609ms making 3 calls to ExtUtils::MM_Unix::pm_to_blib, avg 203ms/call
# spent 562ms making 3 calls to ExtUtils::MM_Any::tool_autosplit, avg 187ms/call
# spent 562ms making 3 calls to ExtUtils::MM_Unix::perldepend, avg 187ms/call
# spent 562ms making 3 calls to ExtUtils::MM_Win32::constants, avg 187ms/call
# spent 562ms making 3 calls to ExtUtils::MM_Win32::special_targets, avg 187ms/call
# spent 546ms making 3 calls to ExtUtils::MM_Win32::pasthru, avg 182ms/call
# spent 374ms making 3 calls to ExtUtils::MM_Unix::subdirs, avg 125ms/call
# spent 359ms making 3 calls to ExtUtils::MM_Any::clean_subdirs_target, avg 120ms/call
# spent 187ms making 1 call to ExtUtils::MM_Any::dist_test
# spent 187ms making 1 call to ExtUtils::MM_Unix::dist_core
# spent 0s making 3 calls to ExtUtils::MM_Any::blibdirs_target, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Any::clean, avg 0s/call
# spent 0s making 1 call to ExtUtils::MM_Any::distdir
# spent 0s making 3 calls to ExtUtils::MM_Any::dynamic, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Any::makemakerdflt_target, avg 0s/call
# spent 0s making 154 calls to ExtUtils::MM_Any::maketext_filter, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Any::manifypods, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Any::realclean, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Any::signature_target, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Any::tools_other, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::c_o, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::const_cccmd, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::const_config, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::const_loadlibs, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::depend, avg 0s/call
# spent 0s making 1 call to ExtUtils::MM_Unix::dist
# spent 0s making 1 call to ExtUtils::MM_Unix::dist_basics
# spent 0s making 1 call to ExtUtils::MM_Unix::dist_ci
# spent 0s making 3 calls to ExtUtils::MM_Unix::dynamic_bs, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::force, avg 0s/call
# spent 0s making 1 call to ExtUtils::MM_Unix::install
# spent 0s making 3 calls to ExtUtils::MM_Unix::installbin, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::linkext, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::macro, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::post_constants, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::post_initialize, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::postamble, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::processPL, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::static, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::staticmake, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::tool_xsubpp, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::top_targets, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Unix::xs_c, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Win32::cflags, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Win32::dlsyms, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Win32::dynamic_lib, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Win32::platform_constants, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Win32::static_lib, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MM_Win32::xs_o, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MakeMaker::selfdocument, avg 0s/call
# spent 0s making 3 calls to MY::makefile, avg 0s/call |
| 746 | $self->$method( %a ) | ||||
| 747 | ); | ||||
| 748 | } | ||||
| 749 | } | ||||
| 750 | |||||
| 751 | 3 | 0s | push @{$self->{RESULT}}, "\n# End."; | ||
| 752 | |||||
| 753 | 3 | 0s | $self; | ||
| 754 | } | ||||
| 755 | |||||
| 756 | sub WriteEmptyMakefile { | ||||
| 757 | croak "WriteEmptyMakefile: Need an even number of args" if @_ % 2; | ||||
| 758 | |||||
| 759 | my %att = @_; | ||||
| 760 | my $self = MM->new(\%att); | ||||
| 761 | |||||
| 762 | my $new = $self->{MAKEFILE}; | ||||
| 763 | my $old = $self->{MAKEFILE_OLD}; | ||||
| 764 | if (-f $old) { | ||||
| 765 | _unlink($old) or warn "unlink $old: $!"; | ||||
| 766 | } | ||||
| 767 | if ( -f $new ) { | ||||
| 768 | _rename($new, $old) or warn "rename $new => $old: $!" | ||||
| 769 | } | ||||
| 770 | open my $mfh, '>', $new or die "open $new for write: $!"; | ||||
| 771 | print $mfh <<'EOP'; | ||||
| 772 | all : | ||||
| 773 | |||||
| 774 | clean : | ||||
| 775 | |||||
| 776 | install : | ||||
| 777 | |||||
| 778 | makemakerdflt : | ||||
| 779 | |||||
| 780 | test : | ||||
| 781 | |||||
| 782 | EOP | ||||
| 783 | close $mfh or die "close $new for write: $!"; | ||||
| 784 | } | ||||
| 785 | |||||
| 786 | |||||
| 787 | =begin private | ||||
| 788 | |||||
| 789 | =head3 _installed_file_for_module | ||||
| 790 | |||||
| 791 | my $file = MM->_installed_file_for_module($module); | ||||
| 792 | |||||
| 793 | Return the first installed .pm $file associated with the $module. The | ||||
| 794 | one which will show up when you C<use $module>. | ||||
| 795 | |||||
| 796 | $module is something like "strict" or "Test::More". | ||||
| 797 | |||||
| 798 | =end private | ||||
| 799 | |||||
| 800 | =cut | ||||
| 801 | |||||
| 802 | sub _installed_file_for_module { | ||||
| 803 | my $class = shift; | ||||
| 804 | my $prereq = shift; | ||||
| 805 | |||||
| 806 | my $file = "$prereq.pm"; | ||||
| 807 | $file =~ s{::}{/}g; | ||||
| 808 | |||||
| 809 | my $path; | ||||
| 810 | for my $dir (@INC) { | ||||
| 811 | my $tmp = File::Spec->catfile($dir, $file); | ||||
| 812 | if ( -r $tmp ) { | ||||
| 813 | $path = $tmp; | ||||
| 814 | last; | ||||
| 815 | } | ||||
| 816 | } | ||||
| 817 | |||||
| 818 | return $path; | ||||
| 819 | } | ||||
| 820 | |||||
| 821 | |||||
| 822 | # Extracted from MakeMaker->new so we can test it | ||||
| 823 | # spent 0s within ExtUtils::MakeMaker::_MakeMaker_Parameters_section which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 691, avg 0s/call | ||||
| 824 | 3 | 0s | my $self = shift; | ||
| 825 | 3 | 0s | my $att = shift; | ||
| 826 | |||||
| 827 | 3 | 0s | my @result = <<'END'; | ||
| 828 | # MakeMaker Parameters: | ||||
| 829 | END | ||||
| 830 | |||||
| 831 | 3 | 0s | 3 | 0s | foreach my $key (sort keys %$att){ # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:sort, avg 0s/call |
| 832 | 32 | 0s | next if $key eq 'ARGS'; | ||
| 833 | 29 | 0s | my $v; | ||
| 834 | 29 | 0s | 3 | 0s | if ($key eq 'PREREQ_PM') { # spent 0s making 3 calls to ExtUtils::MakeMaker::neatvalue, avg 0s/call |
| 835 | # CPAN.pm takes prereqs from this field in 'Makefile' | ||||
| 836 | # and does not know about BUILD_REQUIRES | ||||
| 837 | $v = neatvalue({ | ||||
| 838 | %{ $att->{PREREQ_PM} || {} }, | ||||
| 839 | %{ $att->{BUILD_REQUIRES} || {} }, | ||||
| 840 | %{ $att->{TEST_REQUIRES} || {} }, | ||||
| 841 | }); | ||||
| 842 | } else { | ||||
| 843 | 26 | 0s | 26 | 0s | $v = neatvalue($att->{$key}); # spent 0s making 26 calls to ExtUtils::MakeMaker::neatvalue, avg 0s/call |
| 844 | } | ||||
| 845 | |||||
| 846 | 29 | 0s | 29 | 0s | $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/; # spent 0s making 29 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call |
| 847 | 29 | 0s | $v =~ tr/\n/ /s; | ||
| 848 | 29 | 0s | push @result, "# $key => $v"; | ||
| 849 | } | ||||
| 850 | |||||
| 851 | 3 | 0s | return @result; | ||
| 852 | } | ||||
| 853 | |||||
| 854 | # _shellwords and _parseline borrowed from Text::ParseWords | ||||
| 855 | # spent 0s within ExtUtils::MakeMaker::_shellwords which was called:
# once (0s+0s) by ExtUtils::MakeMaker::new at line 627 | ||||
| 856 | 1 | 0s | my (@lines) = @_; | ||
| 857 | 1 | 0s | my @allwords; | ||
| 858 | |||||
| 859 | 1 | 0s | foreach my $line (@lines) { | ||
| 860 | 1 | 0s | 1 | 0s | $line =~ s/^\s+//; # spent 0s making 1 call to ExtUtils::MakeMaker::CORE:subst |
| 861 | 1 | 0s | 1 | 0s | my @words = _parse_line('\s+', 0, $line); # spent 0s making 1 call to ExtUtils::MakeMaker::_parse_line |
| 862 | 1 | 0s | pop @words if (@words and !defined $words[-1]); | ||
| 863 | 1 | 0s | return() unless (@words || !length($line)); | ||
| 864 | 1 | 0s | push(@allwords, @words); | ||
| 865 | } | ||||
| 866 | 1 | 0s | return(@allwords); | ||
| 867 | } | ||||
| 868 | |||||
| 869 | # spent 0s within ExtUtils::MakeMaker::_parse_line which was called:
# once (0s+0s) by ExtUtils::MakeMaker::_shellwords at line 861 | ||||
| 870 | 1 | 0s | my($delimiter, $keep, $line) = @_; | ||
| 871 | 1 | 0s | my($word, @pieces); | ||
| 872 | |||||
| 873 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MakeMaker::BEGIN@873 which was called:
# once (0s+0s) by main::BEGIN@1 at line 873 # spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@873
# spent 0s making 1 call to warnings::unimport |
| 874 | |||||
| 875 | 1 | 0s | while (length($line)) { | ||
| 876 | # This pattern is optimised to be stack conservative on older perls. | ||||
| 877 | # Do not refactor without being careful and testing it on very long strings. | ||||
| 878 | # See Perl bug #42980 for an example of a stack busting input. | ||||
| 879 | $line =~ s/^ | ||||
| 880 | (?: | ||||
| 881 | # double quoted string | ||||
| 882 | (") # $quote | ||||
| 883 | ((?>[^\\"]*(?:\\.[^\\"]*)*))" # $quoted | ||||
| 884 | | # --OR-- | ||||
| 885 | # singe quoted string | ||||
| 886 | (') # $quote | ||||
| 887 | ((?>[^\\']*(?:\\.[^\\']*)*))' # $quoted | ||||
| 888 | | # --OR-- | ||||
| 889 | # unquoted string | ||||
| 890 | ( # $unquoted | ||||
| 891 | (?:\\.|[^\\"'])*? | ||||
| 892 | ) | ||||
| 893 | # followed by | ||||
| 894 | ( # $delim | ||||
| 895 | \Z(?!\n) # EOL | ||||
| 896 | | # --OR-- | ||||
| 897 | (?-x:$delimiter) # delimiter | ||||
| 898 | | # --OR-- | ||||
| 899 | (?!^)(?=["']) # a quote | ||||
| 900 | ) | ||||
| 901 | )//xs or return; # extended layout | ||||
| 902 | my ($quote, $quoted, $unquoted, $delim) = (($1 ? ($1,$2) : ($3,$4)), $5, $6); | ||||
| 903 | |||||
| 904 | |||||
| 905 | return() unless( defined($quote) || length($unquoted) || length($delim)); | ||||
| 906 | |||||
| 907 | if ($keep) { | ||||
| 908 | $quoted = "$quote$quoted$quote"; | ||||
| 909 | } | ||||
| 910 | else { | ||||
| 911 | $unquoted =~ s/\\(.)/$1/sg; | ||||
| 912 | if (defined $quote) { | ||||
| 913 | $quoted =~ s/\\(.)/$1/sg if ($quote eq '"'); | ||||
| 914 | #$quoted =~ s/\\([\\'])/$1/g if ( $PERL_SINGLE_QUOTE && $quote eq "'"); | ||||
| 915 | } | ||||
| 916 | } | ||||
| 917 | $word .= substr($line, 0, 0); # leave results tainted | ||||
| 918 | $word .= defined $quote ? $quoted : $unquoted; | ||||
| 919 | |||||
| 920 | if (length($delim)) { | ||||
| 921 | push(@pieces, $word); | ||||
| 922 | push(@pieces, $delim) if ($keep eq 'delimiters'); | ||||
| 923 | undef $word; | ||||
| 924 | } | ||||
| 925 | if (!length($line)) { | ||||
| 926 | push(@pieces, $word); | ||||
| 927 | } | ||||
| 928 | } | ||||
| 929 | 1 | 0s | return(@pieces); | ||
| 930 | } | ||||
| 931 | |||||
| 932 | # spent 31.2ms (0s+31.2) within ExtUtils::MakeMaker::check_manifest which was called:
# once (0s+31.2ms) by ExtUtils::MakeMaker::new at line 442 | ||||
| 933 | 1 | 0s | 1 | 0s | print "Checking if your kit is complete...\n"; # spent 0s making 1 call to ExtUtils::MakeMaker::CORE:print |
| 934 | 1 | 0s | require ExtUtils::Manifest; | ||
| 935 | # avoid warning | ||||
| 936 | 1 | 0s | $ExtUtils::Manifest::Quiet = $ExtUtils::Manifest::Quiet = 1; | ||
| 937 | 1 | 0s | 1 | 15.6ms | my(@missed) = ExtUtils::Manifest::manicheck(); # spent 15.6ms making 1 call to ExtUtils::Manifest::manicheck |
| 938 | 1 | 0s | if (@missed) { | ||
| 939 | print "Warning: the following files are missing in your kit:\n"; | ||||
| 940 | print "\t", join "\n\t", @missed; | ||||
| 941 | print "\n"; | ||||
| 942 | print "Please inform the author.\n"; | ||||
| 943 | } else { | ||||
| 944 | 1 | 0s | 1 | 0s | print "Looks good\n"; # spent 0s making 1 call to ExtUtils::MakeMaker::CORE:print |
| 945 | } | ||||
| 946 | } | ||||
| 947 | |||||
| 948 | # spent 0s within ExtUtils::MakeMaker::parse_args which was called:
# once (0s+0s) by ExtUtils::MakeMaker::new at line 627 | ||||
| 949 | 1 | 0s | my($self, @args) = @_; | ||
| 950 | 1 | 0s | @args = map { Encode::decode(locale => $_) } @args if $CAN_DECODE; | ||
| 951 | 1 | 0s | foreach (@args) { | ||
| 952 | unless (m/(.*?)=(.*)/) { | ||||
| 953 | ++$Verbose if m/^verb/; | ||||
| 954 | next; | ||||
| 955 | } | ||||
| 956 | my($name, $value) = ($1, $2); | ||||
| 957 | if ($value =~ m/^~(\w+)?/) { # tilde with optional username | ||||
| 958 | $value =~ s [^~(\w*)] | ||||
| 959 | [$1 ? | ||||
| 960 | ((getpwnam($1))[7] || "~$1") : | ||||
| 961 | (getpwuid($>))[7] | ||||
| 962 | ]ex; | ||||
| 963 | } | ||||
| 964 | |||||
| 965 | # Remember the original args passed it. It will be useful later. | ||||
| 966 | $self->{ARGS}{uc $name} = $self->{uc $name} = $value; | ||||
| 967 | } | ||||
| 968 | |||||
| 969 | # catch old-style 'potential_libs' and inform user how to 'upgrade' | ||||
| 970 | 1 | 0s | if (defined $self->{potential_libs}){ | ||
| 971 | my($msg)="'potential_libs' => '$self->{potential_libs}' should be"; | ||||
| 972 | if ($self->{potential_libs}){ | ||||
| 973 | print "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n"; | ||||
| 974 | } else { | ||||
| 975 | print "$msg deleted.\n"; | ||||
| 976 | } | ||||
| 977 | $self->{LIBS} = [$self->{potential_libs}]; | ||||
| 978 | delete $self->{potential_libs}; | ||||
| 979 | } | ||||
| 980 | # catch old-style 'ARMAYBE' and inform user how to 'upgrade' | ||||
| 981 | 1 | 0s | if (defined $self->{ARMAYBE}){ | ||
| 982 | my($armaybe) = $self->{ARMAYBE}; | ||||
| 983 | print "ARMAYBE => '$armaybe' should be changed to:\n", | ||||
| 984 | "\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n"; | ||||
| 985 | my(%dl) = %{$self->{dynamic_lib} || {}}; | ||||
| 986 | $self->{dynamic_lib} = { %dl, ARMAYBE => $armaybe}; | ||||
| 987 | delete $self->{ARMAYBE}; | ||||
| 988 | } | ||||
| 989 | 1 | 0s | if (defined $self->{LDTARGET}){ | ||
| 990 | print "LDTARGET should be changed to LDFROM\n"; | ||||
| 991 | $self->{LDFROM} = $self->{LDTARGET}; | ||||
| 992 | delete $self->{LDTARGET}; | ||||
| 993 | } | ||||
| 994 | # Turn a DIR argument on the command line into an array | ||||
| 995 | 1 | 0s | if (defined $self->{DIR} && ref \$self->{DIR} eq 'SCALAR') { | ||
| 996 | # So they can choose from the command line, which extensions they want | ||||
| 997 | # the grep enables them to have some colons too much in case they | ||||
| 998 | # have to build a list with the shell | ||||
| 999 | $self->{DIR} = [grep $_, split ":", $self->{DIR}]; | ||||
| 1000 | } | ||||
| 1001 | # Turn a INCLUDE_EXT argument on the command line into an array | ||||
| 1002 | 1 | 0s | if (defined $self->{INCLUDE_EXT} && ref \$self->{INCLUDE_EXT} eq 'SCALAR') { | ||
| 1003 | $self->{INCLUDE_EXT} = [grep $_, split '\s+', $self->{INCLUDE_EXT}]; | ||||
| 1004 | } | ||||
| 1005 | # Turn a EXCLUDE_EXT argument on the command line into an array | ||||
| 1006 | 1 | 0s | if (defined $self->{EXCLUDE_EXT} && ref \$self->{EXCLUDE_EXT} eq 'SCALAR') { | ||
| 1007 | $self->{EXCLUDE_EXT} = [grep $_, split '\s+', $self->{EXCLUDE_EXT}]; | ||||
| 1008 | } | ||||
| 1009 | |||||
| 1010 | 1 | 0s | 1 | 0s | foreach my $mmkey (sort keys %$self){ # spent 0s making 1 call to ExtUtils::MakeMaker::CORE:sort |
| 1011 | 14 | 0s | next if $mmkey eq 'ARGS'; | ||
| 1012 | 13 | 0s | print " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose; | ||
| 1013 | 13 | 0s | print "'$mmkey' is not a known MakeMaker parameter name.\n" | ||
| 1014 | unless exists $Recognized_Att_Keys{$mmkey}; | ||||
| 1015 | } | ||||
| 1016 | 1 | 0s | $| = 1 if $Verbose; | ||
| 1017 | } | ||||
| 1018 | |||||
| 1019 | # spent 0s within ExtUtils::MakeMaker::check_hints which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 446, avg 0s/call | ||||
| 1020 | 3 | 0s | my($self) = @_; | ||
| 1021 | # We allow extension-specific hints files. | ||||
| 1022 | |||||
| 1023 | 3 | 0s | require File::Spec; | ||
| 1024 | 3 | 0s | 3 | 0s | my $curdir = File::Spec->curdir; # spent 0s making 3 calls to File::Spec::Unix::curdir, avg 0s/call |
| 1025 | |||||
| 1026 | 3 | 0s | 3 | 0s | my $hint_dir = File::Spec->catdir($curdir, "hints"); # spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call |
| 1027 | 3 | 0s | 3 | 0s | return unless -d $hint_dir; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:ftdir, avg 0s/call |
| 1028 | |||||
| 1029 | # First we look for the best hintsfile we have | ||||
| 1030 | my($hint)="${^O}_$Config{osvers}"; | ||||
| 1031 | $hint =~ s/\./_/g; | ||||
| 1032 | $hint =~ s/_$//; | ||||
| 1033 | return unless $hint; | ||||
| 1034 | |||||
| 1035 | # Also try without trailing minor version numbers. | ||||
| 1036 | while (1) { | ||||
| 1037 | last if -f File::Spec->catfile($hint_dir, "$hint.pl"); # found | ||||
| 1038 | } continue { | ||||
| 1039 | last unless $hint =~ s/_[^_]*$//; # nothing to cut off | ||||
| 1040 | } | ||||
| 1041 | my $hint_file = File::Spec->catfile($hint_dir, "$hint.pl"); | ||||
| 1042 | |||||
| 1043 | return unless -f $hint_file; # really there | ||||
| 1044 | |||||
| 1045 | _run_hintfile($self, $hint_file); | ||||
| 1046 | } | ||||
| 1047 | |||||
| 1048 | sub _run_hintfile { | ||||
| 1049 | our $self; | ||||
| 1050 | local($self) = shift; # make $self available to the hint file. | ||||
| 1051 | my($hint_file) = shift; | ||||
| 1052 | |||||
| 1053 | local($@, $!); | ||||
| 1054 | warn "Processing hints file $hint_file\n"; | ||||
| 1055 | |||||
| 1056 | # Just in case the ./ isn't on the hint file, which File::Spec can | ||||
| 1057 | # often strip off, we bung the curdir into @INC | ||||
| 1058 | local @INC = (File::Spec->curdir, @INC); | ||||
| 1059 | my $ret = do $hint_file; | ||||
| 1060 | if( !defined $ret ) { | ||||
| 1061 | my $error = $@ || $!; | ||||
| 1062 | warn $error; | ||||
| 1063 | } | ||||
| 1064 | } | ||||
| 1065 | |||||
| 1066 | # spent 0s within ExtUtils::MakeMaker::mv_all_methods which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 572, avg 0s/call | ||||
| 1067 | 3 | 0s | my($from,$to) = @_; | ||
| 1068 | |||||
| 1069 | # Here you see the *current* list of methods that are overridable | ||||
| 1070 | # from Makefile.PL via MY:: subroutines. As of VERSION 5.07 I'm | ||||
| 1071 | # still trying to reduce the list to some reasonable minimum -- | ||||
| 1072 | # because I want to make it easier for the user. A.K. | ||||
| 1073 | |||||
| 1074 | local $SIG{__WARN__} = sub { | ||||
| 1075 | # can't use 'no warnings redefined', 5.6 only | ||||
| 1076 | warn @_ unless $_[0] =~ /^Subroutine .* redefined/ | ||||
| 1077 | 3 | 0s | }; | ||
| 1078 | 3 | 0s | foreach my $method (@Overridable) { | ||
| 1079 | |||||
| 1080 | # We cannot say "next" here. Nick might call MY->makeaperl | ||||
| 1081 | # which isn't defined right now | ||||
| 1082 | |||||
| 1083 | # Above statement was written at 4.23 time when Tk-b8 was | ||||
| 1084 | # around. As Tk-b9 only builds with 5.002something and MM 5 is | ||||
| 1085 | # standard, we try to enable the next line again. It was | ||||
| 1086 | # commented out until MM 5.23 | ||||
| 1087 | |||||
| 1088 | 216 | 0s | next unless defined &{"${from}::$method"}; | ||
| 1089 | |||||
| 1090 | { | ||||
| 1091 | 5 | 0s | 2 | 0s | # spent 0s within ExtUtils::MakeMaker::BEGIN@1091 which was called:
# once (0s+0s) by main::BEGIN@1 at line 1091 # spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@1091
# spent 0s making 1 call to strict::unimport |
| 1092 | 3 | 0s | *{"${to}::$method"} = \&{"${from}::$method"}; | ||
| 1093 | |||||
| 1094 | # If we delete a method, then it will be undefined and cannot | ||||
| 1095 | # be called. But as long as we have Makefile.PLs that rely on | ||||
| 1096 | # %MY:: being intact, we have to fill the hole with an | ||||
| 1097 | # inheriting method: | ||||
| 1098 | |||||
| 1099 | { | ||||
| 1100 | 3 | 0s | package MY; | ||
| 1101 | 3 | 0s | my $super = "SUPER::".$method; | ||
| 1102 | *{$method} = sub { | ||||
| 1103 | shift->$super(@_); | ||||
| 1104 | 3 | 0s | }; | ||
| 1105 | } | ||||
| 1106 | } | ||||
| 1107 | } | ||||
| 1108 | |||||
| 1109 | # We have to clean out %INC also, because the current directory is | ||||
| 1110 | # changed frequently and Graham Barr prefers to get his version | ||||
| 1111 | # out of a History.pl file which is "required" so wouldn't get | ||||
| 1112 | # loaded again in another extension requiring a History.pl | ||||
| 1113 | |||||
| 1114 | # With perl5.002_01 the deletion of entries in %INC caused Tk-b11 | ||||
| 1115 | # to core dump in the middle of a require statement. The required | ||||
| 1116 | # file was Tk/MMutil.pm. The consequence is, we have to be | ||||
| 1117 | # extremely careful when we try to give perl a reason to reload a | ||||
| 1118 | # library with same name. The workaround prefers to drop nothing | ||||
| 1119 | # from %INC and teach the writers not to use such libraries. | ||||
| 1120 | |||||
| 1121 | # my $inc; | ||||
| 1122 | # foreach $inc (keys %INC) { | ||||
| 1123 | # #warn "***$inc*** deleted"; | ||||
| 1124 | # delete $INC{$inc}; | ||||
| 1125 | # } | ||||
| 1126 | } | ||||
| 1127 | |||||
| 1128 | # spent 0s within ExtUtils::MakeMaker::skipcheck which was called 168 times, avg 0s/call:
# 168 times (0s+0s) by ExtUtils::MakeMaker::new at line 738, avg 0s/call | ||||
| 1129 | 168 | 0s | my($self) = shift; | ||
| 1130 | 168 | 0s | my($section) = @_; | ||
| 1131 | 168 | 0s | if ($section eq 'dynamic') { | ||
| 1132 | 3 | 0s | print "Warning (non-fatal): Target 'dynamic' depends on targets ", | ||
| 1133 | "in skipped section 'dynamic_bs'\n" | ||||
| 1134 | if $self->{SKIPHASH}{dynamic_bs} && $Verbose; | ||||
| 1135 | 3 | 0s | print "Warning (non-fatal): Target 'dynamic' depends on targets ", | ||
| 1136 | "in skipped section 'dynamic_lib'\n" | ||||
| 1137 | if $self->{SKIPHASH}{dynamic_lib} && $Verbose; | ||||
| 1138 | } | ||||
| 1139 | 168 | 0s | if ($section eq 'dynamic_lib') { | ||
| 1140 | print "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ", | ||||
| 1141 | "targets in skipped section 'dynamic_bs'\n" | ||||
| 1142 | if $self->{SKIPHASH}{dynamic_bs} && $Verbose; | ||||
| 1143 | } | ||||
| 1144 | 168 | 0s | if ($section eq 'static') { | ||
| 1145 | print "Warning (non-fatal): Target 'static' depends on targets ", | ||||
| 1146 | "in skipped section 'static_lib'\n" | ||||
| 1147 | if $self->{SKIPHASH}{static_lib} && $Verbose; | ||||
| 1148 | } | ||||
| 1149 | 168 | 0s | return 'skipped' if $self->{SKIPHASH}{$section}; | ||
| 1150 | 154 | 0s | return ''; | ||
| 1151 | } | ||||
| 1152 | |||||
| 1153 | # spent 125ms (0s+125) within ExtUtils::MakeMaker::flush which was called 3 times, avg 41.6ms/call:
# 3 times (0s+125ms) by ExtUtils::MakeMaker::WriteMakefile at line 68, avg 41.6ms/call | ||||
| 1154 | 3 | 0s | my $self = shift; | ||
| 1155 | |||||
| 1156 | # This needs a bit more work for more wacky OSen | ||||
| 1157 | 3 | 0s | my $type = 'Unix-style'; | ||
| 1158 | 3 | 0s | 3 | 0s | if ( $self->os_flavor_is('Win32') ) { # spent 0s making 3 calls to ExtUtils::MM_Any::os_flavor_is, avg 0s/call |
| 1159 | 3 | 0s | 3 | 0s | my $make = $self->make; # spent 0s making 3 calls to ExtUtils::MM_Any::make, avg 0s/call |
| 1160 | 3 | 0s | 3 | 0s | $make = +( File::Spec->splitpath( $make ) )[-1]; # spent 0s making 3 calls to File::Spec::Win32::splitpath, avg 0s/call |
| 1161 | 3 | 0s | 3 | 0s | $make =~ s!\.exe$!!i; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call |
| 1162 | 3 | 0s | $type = $make . '-style'; | ||
| 1163 | } | ||||
| 1164 | elsif ( $Is_VMS ) { | ||||
| 1165 | $type = $Config{make} . '-style'; | ||||
| 1166 | } | ||||
| 1167 | |||||
| 1168 | 3 | 0s | my $finalname = $self->{MAKEFILE}; | ||
| 1169 | 3 | 0s | 3 | 0s | print "Generating a $type $finalname\n"; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:print, avg 0s/call |
| 1170 | 3 | 0s | 3 | 0s | print "Writing $finalname for $self->{NAME}\n"; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:print, avg 0s/call |
| 1171 | |||||
| 1172 | 3 | 0s | 3 | 0s | unlink($finalname, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : ()); # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:unlink, avg 0s/call |
| 1173 | 3 | 0s | 3 | 0s | open(my $fh,">", "MakeMaker.tmp") # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:open, avg 0s/call |
| 1174 | or die "Unable to open MakeMaker.tmp: $!"; | ||||
| 1175 | 5 | 0s | 13 | 0s | binmode $fh, ':encoding(locale)' if $CAN_DECODE; # spent 0s making 3 calls to Encode::XS::needs_lines, avg 0s/call
# spent 0s making 3 calls to Encode::XS::renew, avg 0s/call
# spent 0s making 3 calls to Encode::find_encoding, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:binmode, avg 0s/call
# spent 0s making 1 call to PerlIO::import |
| 1176 | |||||
| 1177 | 3 | 0s | for my $chunk (@{$self->{RESULT}}) { | ||
| 1178 | 360 | 0s | my $to_write = "$chunk\n"; | ||
| 1179 | 360 | 0s | if (!$CAN_DECODE && $] > 5.008) { | ||
| 1180 | utf8::encode $to_write; | ||||
| 1181 | } | ||||
| 1182 | 360 | 0s | 450 | 0s | print $fh "$chunk\n" # spent 0s making 90 calls to Encode::XS::encode, avg 0s/call
# spent 0s making 360 calls to ExtUtils::MakeMaker::CORE:print, avg 0s/call |
| 1183 | or die "Can't write to MakeMaker.tmp: $!"; | ||||
| 1184 | } | ||||
| 1185 | |||||
| 1186 | 3 | 0s | 6 | 0s | close $fh # spent 0s making 3 calls to Encode::XS::encode, avg 0s/call
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:close, avg 0s/call |
| 1187 | or die "Can't write to MakeMaker.tmp: $!"; | ||||
| 1188 | 3 | 0s | 3 | 0s | _rename("MakeMaker.tmp", $finalname) or # spent 0s making 3 calls to ExtUtils::MakeMaker::_rename, avg 0s/call |
| 1189 | warn "rename MakeMaker.tmp => $finalname: $!"; | ||||
| 1190 | 3 | 0s | 3 | 0s | chmod 0644, $finalname unless $Is_VMS; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:chmod, avg 0s/call |
| 1191 | |||||
| 1192 | 3 | 0s | 9 | 125ms | unless ($self->{NO_MYMETA}) { # spent 109ms making 3 calls to ExtUtils::MM_Any::write_mymeta, avg 36.4ms/call
# spent 15.6ms making 3 calls to ExtUtils::MM_Any::mymeta, avg 5.20ms/call
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:print, avg 0s/call |
| 1193 | # Write MYMETA.yml to communicate metadata up to the CPAN clients | ||||
| 1194 | if ( $self->write_mymeta( $self->mymeta ) ) { | ||||
| 1195 | print "Writing MYMETA.yml and MYMETA.json\n"; | ||||
| 1196 | } | ||||
| 1197 | |||||
| 1198 | } | ||||
| 1199 | 3 | 0s | my %keep = map { ($_ => 1) } qw(NEEDS_LINKING HAS_LINK_CODE); | ||
| 1200 | 3 | 0s | if ($self->{PARENT} && !$self->{_KEEP_AFTER_FLUSH}) { | ||
| 1201 | foreach (keys %$self) { # safe memory | ||||
| 1202 | 432 | 0s | delete $self->{$_} unless $keep{$_}; | ||
| 1203 | } | ||||
| 1204 | } | ||||
| 1205 | |||||
| 1206 | 3 | 0s | 3 | 0s | system("$Config::Config{eunicefix} $finalname") unless $Config::Config{eunicefix} eq ":"; # spent 0s making 3 calls to Config::FETCH, avg 0s/call |
| 1207 | } | ||||
| 1208 | |||||
| 1209 | # This is a rename for OS's where the target must be unlinked first. | ||||
| 1210 | # spent 0s within ExtUtils::MakeMaker::_rename which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1188, avg 0s/call | ||||
| 1211 | 3 | 0s | my($src, $dest) = @_; | ||
| 1212 | 3 | 0s | 3 | 0s | chmod 0666, $dest; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:chmod, avg 0s/call |
| 1213 | 3 | 0s | 3 | 0s | unlink $dest; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:unlink, avg 0s/call |
| 1214 | 3 | 0s | 3 | 0s | return rename $src, $dest; # spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:rename, avg 0s/call |
| 1215 | } | ||||
| 1216 | |||||
| 1217 | # This is an unlink for OS's where the target must be writable first. | ||||
| 1218 | sub _unlink { | ||||
| 1219 | my @files = @_; | ||||
| 1220 | chmod 0666, @files; | ||||
| 1221 | return unlink @files; | ||||
| 1222 | } | ||||
| 1223 | |||||
| 1224 | |||||
| 1225 | # The following mkbootstrap() is only for installations that are calling | ||||
| 1226 | # the pre-4.1 mkbootstrap() from their old Makefiles. This MakeMaker | ||||
| 1227 | # writes Makefiles, that use ExtUtils::Mkbootstrap directly. | ||||
| 1228 | sub mkbootstrap { | ||||
| 1229 | die <<END; | ||||
| 1230 | !!! Your Makefile has been built such a long time ago, !!! | ||||
| 1231 | !!! that is unlikely to work with current MakeMaker. !!! | ||||
| 1232 | !!! Please rebuild your Makefile !!! | ||||
| 1233 | END | ||||
| 1234 | } | ||||
| 1235 | |||||
| 1236 | # Ditto for mksymlists() as of MakeMaker 5.17 | ||||
| 1237 | sub mksymlists { | ||||
| 1238 | die <<END; | ||||
| 1239 | !!! Your Makefile has been built such a long time ago, !!! | ||||
| 1240 | !!! that is unlikely to work with current MakeMaker. !!! | ||||
| 1241 | !!! Please rebuild your Makefile !!! | ||||
| 1242 | END | ||||
| 1243 | } | ||||
| 1244 | |||||
| 1245 | # spent 0s within ExtUtils::MakeMaker::neatvalue which was called 52 times, avg 0s/call:
# 26 times (0s+0s) by ExtUtils::MakeMaker::_MakeMaker_Parameters_section at line 843, avg 0s/call
# 12 times (0s+0s) by ExtUtils::MM_Win32::dlsyms at line 64 of ExtUtils/MM_Win32.pm, avg 0s/call
# 8 times (0s+0s) by ExtUtils::MakeMaker::neatvalue at line 1264, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 674, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::_MakeMaker_Parameters_section at line 834, avg 0s/call | ||||
| 1246 | 52 | 0s | my($v) = @_; | ||
| 1247 | 52 | 0s | return "undef" unless defined $v; | ||
| 1248 | 50 | 0s | my($t) = ref $v; | ||
| 1249 | 50 | 0s | return "q[$v]" unless $t; | ||
| 1250 | 34 | 0s | if ($t eq 'ARRAY') { | ||
| 1251 | 11 | 0s | my(@m, @neat); | ||
| 1252 | 11 | 0s | push @m, "["; | ||
| 1253 | 11 | 0s | foreach my $elem (@$v) { | ||
| 1254 | 2 | 0s | push @neat, "q[$elem]"; | ||
| 1255 | } | ||||
| 1256 | 11 | 0s | push @m, join ", ", @neat; | ||
| 1257 | 11 | 0s | push @m, "]"; | ||
| 1258 | 11 | 0s | return join "", @m; | ||
| 1259 | } | ||||
| 1260 | 23 | 0s | return $v unless $t eq 'HASH'; | ||
| 1261 | 23 | 0s | my(@m, $key, $val); | ||
| 1262 | 23 | 0s | 23 | 0s | for my $key (sort keys %$v) { # spent 0s making 23 calls to ExtUtils::MakeMaker::CORE:sort, avg 0s/call |
| 1263 | 8 | 0s | last unless defined $key; # cautious programming in case (undef,undef) is true | ||
| 1264 | 8 | 0s | 8 | 0s | push @m,"$key=>".neatvalue($v->{$key}); # spent 0s making 8 calls to ExtUtils::MakeMaker::neatvalue, avg 0s/call, recursion: max depth 3, sum of overlapping time 0s |
| 1265 | } | ||||
| 1266 | 23 | 0s | return "{ ".join(', ',@m)." }"; | ||
| 1267 | } | ||||
| 1268 | |||||
| 1269 | sub _find_magic_vstring { | ||||
| 1270 | my $value = shift; | ||||
| 1271 | return $value if $UNDER_CORE; | ||||
| 1272 | my $tvalue = ''; | ||||
| 1273 | require B; | ||||
| 1274 | my $sv = B::svref_2object(\$value); | ||||
| 1275 | my $magic = ref($sv) eq 'B::PVMG' ? $sv->MAGIC : undef; | ||||
| 1276 | while ( $magic ) { | ||||
| 1277 | if ( $magic->TYPE eq 'V' ) { | ||||
| 1278 | $tvalue = $magic->PTR; | ||||
| 1279 | $tvalue =~ s/^v?(.+)$/v$1/; | ||||
| 1280 | last; | ||||
| 1281 | } | ||||
| 1282 | else { | ||||
| 1283 | $magic = $magic->MOREMAGIC; | ||||
| 1284 | } | ||||
| 1285 | } | ||||
| 1286 | return $tvalue; | ||||
| 1287 | } | ||||
| 1288 | |||||
| 1289 | |||||
| 1290 | # Look for weird version numbers, warn about them and set them to 0 | ||||
| 1291 | # before CPAN::Meta chokes. | ||||
| 1292 | # spent 0s within ExtUtils::MakeMaker::clean_versions which was called 12 times, avg 0s/call:
# 12 times (0s+0s) by ExtUtils::MakeMaker::new at line 428, avg 0s/call | ||||
| 1293 | 12 | 0s | my($self, $key) = @_; | ||
| 1294 | 12 | 0s | my $reqs = $self->{$key}; | ||
| 1295 | 12 | 0s | for my $module (keys %$reqs) { | ||
| 1296 | my $v = $reqs->{$module}; | ||||
| 1297 | my $printable = _find_magic_vstring($v); | ||||
| 1298 | $v = $printable if length $printable; | ||||
| 1299 | my $version = eval { | ||||
| 1300 | local $SIG{__WARN__} = sub { | ||||
| 1301 | # simulate "use warnings FATAL => 'all'" for vintage perls | ||||
| 1302 | die @_; | ||||
| 1303 | }; | ||||
| 1304 | version->new($v)->stringify; | ||||
| 1305 | }; | ||||
| 1306 | if( $@ || $reqs->{$module} eq '' ) { | ||||
| 1307 | if ( $] < 5.008 && $v !~ /^v?[\d_\.]+$/ ) { | ||||
| 1308 | $v = sprintf "v%vd", $v unless $v eq ''; | ||||
| 1309 | } | ||||
| 1310 | carp "Unparsable version '$v' for prerequisite $module"; | ||||
| 1311 | $reqs->{$module} = 0; | ||||
| 1312 | } | ||||
| 1313 | else { | ||||
| 1314 | $reqs->{$module} = $version; | ||||
| 1315 | } | ||||
| 1316 | } | ||||
| 1317 | } | ||||
| 1318 | |||||
| 1319 | # spent 0s within ExtUtils::MakeMaker::selfdocument which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745, avg 0s/call | ||||
| 1320 | 3 | 0s | my($self) = @_; | ||
| 1321 | 3 | 0s | my(@m); | ||
| 1322 | 3 | 0s | if ($Verbose){ | ||
| 1323 | push @m, "\n# Full list of MakeMaker attribute values:"; | ||||
| 1324 | foreach my $key (sort keys %$self){ | ||||
| 1325 | next if $key eq 'RESULT' || $key =~ /^[A-Z][a-z]/; | ||||
| 1326 | my($v) = neatvalue($self->{$key}); | ||||
| 1327 | $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/; | ||||
| 1328 | $v =~ tr/\n/ /s; | ||||
| 1329 | push @m, "# $key => $v"; | ||||
| 1330 | } | ||||
| 1331 | } | ||||
| 1332 | 3 | 0s | join "\n", @m; | ||
| 1333 | } | ||||
| 1334 | |||||
| 1335 | 1 | 0s | 1; | ||
| 1336 | |||||
| 1337 | __END__ | ||||
# spent 0s within ExtUtils::MakeMaker::CORE:binmode which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1175, avg 0s/call | |||||
sub ExtUtils::MakeMaker::CORE:chdir; # opcode | |||||
sub ExtUtils::MakeMaker::CORE:chmod; # opcode | |||||
# spent 0s within ExtUtils::MakeMaker::CORE:close which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1186, avg 0s/call | |||||
# spent 0s within ExtUtils::MakeMaker::CORE:ftdir which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::check_hints at line 1027, avg 0s/call | |||||
# spent 0s within ExtUtils::MakeMaker::CORE:ftfile which was called 4 times, avg 0s/call:
# 4 times (0s+0s) by ExtUtils::MakeMaker::new at line 442, avg 0s/call | |||||
# spent 0s within ExtUtils::MakeMaker::CORE:ftis which was called 5 times, avg 0s/call:
# 5 times (0s+0s) by ExtUtils::MakeMaker::eval_in_subdirs at line 223, avg 0s/call | |||||
# spent 0s within ExtUtils::MakeMaker::CORE:match which was called 48 times, avg 0s/call:
# 18 times (0s+0s) by ExtUtils::MakeMaker::new at line 608, avg 0s/call
# 18 times (0s+0s) by ExtUtils::MakeMaker::new at line 605, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 437, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 644, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 432, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 564, avg 0s/call | |||||
# spent 0s within ExtUtils::MakeMaker::CORE:open which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1173, avg 0s/call | |||||
# spent 0s within ExtUtils::MakeMaker::CORE:print which was called 371 times, avg 0s/call:
# 360 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1182, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1170, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1169, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1192, avg 0s/call
# once (0s+0s) by ExtUtils::MakeMaker::check_manifest at line 933
# once (0s+0s) by ExtUtils::MakeMaker::check_manifest at line 944 | |||||
# spent 0s within ExtUtils::MakeMaker::CORE:rename which was called 3 times, avg 0s/call:
# 3 times (0s+0s) by ExtUtils::MakeMaker::_rename at line 1214, avg 0s/call | |||||
# spent 0s within ExtUtils::MakeMaker::CORE:sort which was called 30 times, avg 0s/call:
# 23 times (0s+0s) by ExtUtils::MakeMaker::neatvalue at line 1262, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 499, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::_MakeMaker_Parameters_section at line 831, avg 0s/call
# once (0s+0s) by ExtUtils::MakeMaker::parse_args at line 1010 | |||||
# spent 0s within ExtUtils::MakeMaker::CORE:subst which was called 47 times, avg 0s/call:
# 29 times (0s+0s) by ExtUtils::MakeMaker::_MakeMaker_Parameters_section at line 846, avg 0s/call
# 4 times (0s+0s) by ExtUtils::MakeMaker::new at line 605, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 647, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 676, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1161, avg 0s/call
# 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 675, avg 0s/call
# once (0s+0s) by main::BEGIN@1 at line 31
# once (0s+0s) by ExtUtils::MakeMaker::_shellwords at line 860 | |||||
sub ExtUtils::MakeMaker::CORE:unlink; # opcode |