← Index
NYTProf Performance Profile   « line view »
For Makefile.PL
  Run on Sun Mar 1 16:04:44 2015
Reported on Sun Mar 1 16:09:01 2015

FilenameC:/tmp64ng/perl/lib/ExtUtils/MakeMaker.pm
StatementsExecuted 6187 statements in 15.6ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1110s0sExtUtils::MakeMaker::::BEGIN@10ExtUtils::MakeMaker::BEGIN@10
1110s0sExtUtils::MakeMaker::::BEGIN@1091ExtUtils::MakeMaker::BEGIN@1091
1110s0sExtUtils::MakeMaker::::BEGIN@11ExtUtils::MakeMaker::BEGIN@11
1110s31.2msExtUtils::MakeMaker::::BEGIN@12ExtUtils::MakeMaker::BEGIN@12
1110s0sExtUtils::MakeMaker::::BEGIN@220ExtUtils::MakeMaker::BEGIN@220
1110s0sExtUtils::MakeMaker::::BEGIN@4ExtUtils::MakeMaker::BEGIN@4
1110s0sExtUtils::MakeMaker::::BEGIN@577ExtUtils::MakeMaker::BEGIN@577
1110s0sExtUtils::MakeMaker::::BEGIN@6ExtUtils::MakeMaker::BEGIN@6
1110s0sExtUtils::MakeMaker::::BEGIN@873ExtUtils::MakeMaker::BEGIN@873
1110s109msExtUtils::MakeMaker::::BEGIN@9ExtUtils::MakeMaker::BEGIN@9
3110s0sExtUtils::MakeMaker::::CORE:binmodeExtUtils::MakeMaker::CORE:binmode (opcode)
3210s0sExtUtils::MakeMaker::::CORE:chdirExtUtils::MakeMaker::CORE:chdir (opcode)
6210s0sExtUtils::MakeMaker::::CORE:chmodExtUtils::MakeMaker::CORE:chmod (opcode)
3110s0sExtUtils::MakeMaker::::CORE:closeExtUtils::MakeMaker::CORE:close (opcode)
3110s0sExtUtils::MakeMaker::::CORE:ftdirExtUtils::MakeMaker::CORE:ftdir (opcode)
4110s0sExtUtils::MakeMaker::::CORE:ftfileExtUtils::MakeMaker::CORE:ftfile (opcode)
5110s0sExtUtils::MakeMaker::::CORE:ftisExtUtils::MakeMaker::CORE:ftis (opcode)
48610s0sExtUtils::MakeMaker::::CORE:matchExtUtils::MakeMaker::CORE:match (opcode)
3110s0sExtUtils::MakeMaker::::CORE:openExtUtils::MakeMaker::CORE:open (opcode)
371610s0sExtUtils::MakeMaker::::CORE:printExtUtils::MakeMaker::CORE:print (opcode)
3110s0sExtUtils::MakeMaker::::CORE:renameExtUtils::MakeMaker::CORE:rename (opcode)
30410s0sExtUtils::MakeMaker::::CORE:sortExtUtils::MakeMaker::CORE:sort (opcode)
47810s0sExtUtils::MakeMaker::::CORE:substExtUtils::MakeMaker::CORE:subst (opcode)
6210s0sExtUtils::MakeMaker::::CORE:unlinkExtUtils::MakeMaker::CORE:unlink (opcode)
0000s0sExtUtils::MakeMaker::::WriteEmptyMakefileExtUtils::MakeMaker::WriteEmptyMakefile
3220s62.3sExtUtils::MakeMaker::::WriteMakefileExtUtils::MakeMaker::WriteMakefile (recurses: max depth 1, inclusive time 38.6s)
3110s0sExtUtils::MakeMaker::::_MakeMaker_Parameters_sectionExtUtils::MakeMaker::_MakeMaker_Parameters_section
0000s0sExtUtils::MakeMaker::::__ANON__[:1077]ExtUtils::MakeMaker::__ANON__[:1077]
0000s0sExtUtils::MakeMaker::::__ANON__[:1303]ExtUtils::MakeMaker::__ANON__[:1303]
0000s0sExtUtils::MakeMaker::::__ANON__[:455]ExtUtils::MakeMaker::__ANON__[:455]
0000s0sExtUtils::MakeMaker::::__ANON__[:471]ExtUtils::MakeMaker::__ANON__[:471]
6210s0sExtUtils::MakeMaker::::_convert_compat_attrsExtUtils::MakeMaker::_convert_compat_attrs
0000s0sExtUtils::MakeMaker::::_find_magic_vstringExtUtils::MakeMaker::_find_magic_vstring
0000s0sExtUtils::MakeMaker::::_format_attExtUtils::MakeMaker::_format_att
0000s0sExtUtils::MakeMaker::::_installed_file_for_moduleExtUtils::MakeMaker::_installed_file_for_module
21110s0sExtUtils::MakeMaker::::_is_of_typeExtUtils::MakeMaker::_is_of_type
1110s0sExtUtils::MakeMaker::::_parse_lineExtUtils::MakeMaker::_parse_line
3110s0sExtUtils::MakeMaker::::_renameExtUtils::MakeMaker::_rename
0000s0sExtUtils::MakeMaker::::_run_hintfileExtUtils::MakeMaker::_run_hintfile
1110s0sExtUtils::MakeMaker::::_shellwordsExtUtils::MakeMaker::_shellwords
0000s0sExtUtils::MakeMaker::::_unlinkExtUtils::MakeMaker::_unlink
3110s0sExtUtils::MakeMaker::::_verify_attExtUtils::MakeMaker::_verify_att
3110s0sExtUtils::MakeMaker::::check_hintsExtUtils::MakeMaker::check_hints
1110s31.2msExtUtils::MakeMaker::::check_manifestExtUtils::MakeMaker::check_manifest
12110s0sExtUtils::MakeMaker::::clean_versionsExtUtils::MakeMaker::clean_versions
1110s38.6sExtUtils::MakeMaker::::eval_in_subdirsExtUtils::MakeMaker::eval_in_subdirs
2110s38.6sExtUtils::MakeMaker::::eval_in_xExtUtils::MakeMaker::eval_in_x
3110s125msExtUtils::MakeMaker::::flushExtUtils::MakeMaker::flush
1110s0sExtUtils::MakeMaker::::full_setupExtUtils::MakeMaker::full_setup
0000s0sExtUtils::MakeMaker::::mkbootstrapExtUtils::MakeMaker::mkbootstrap
0000s0sExtUtils::MakeMaker::::mksymlistsExtUtils::MakeMaker::mksymlists
3110s0sExtUtils::MakeMaker::::mv_all_methodsExtUtils::MakeMaker::mv_all_methods
52520s0sExtUtils::MakeMaker::::neatvalueExtUtils::MakeMaker::neatvalue (recurses: max depth 3, inclusive time 0s)
3110s62.2sExtUtils::MakeMaker::::newExtUtils::MakeMaker::new (recurses: max depth 1, inclusive time 38.6s)
1110s0sExtUtils::MakeMaker::::parse_argsExtUtils::MakeMaker::parse_args
0000s0sExtUtils::MakeMaker::::promptExtUtils::MakeMaker::prompt
3110s0sExtUtils::MakeMaker::::selfdocumentExtUtils::MakeMaker::selfdocument
168110s0sExtUtils::MakeMaker::::skipcheckExtUtils::MakeMaker::skipcheck
0000s0sMY::::__ANON__[:1104] MY::__ANON__[:1104]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# $Id$
2package ExtUtils::MakeMaker;
3
420s20s
# spent 0s within ExtUtils::MakeMaker::BEGIN@4 which was called: # once (0s+0s) by main::BEGIN@1 at line 4
use strict;
# spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@4 # spent 0s making 1 call to strict::import
5
610s10s
# spent 0s within ExtUtils::MakeMaker::BEGIN@6 which was called: # once (0s+0s) by main::BEGIN@1 at line 6
BEGIN {require 5.006;}
# spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@6
7
810srequire Exporter;
920s2109ms
# spent 109ms (0s+109) within ExtUtils::MakeMaker::BEGIN@9 which was called: # once (0s+109ms) by main::BEGIN@1 at line 9
use ExtUtils::MakeMaker::Config;
# spent 109ms making 1 call to ExtUtils::MakeMaker::BEGIN@9 # spent 0s making 1 call to ExtUtils::MakeMaker::Config::import
1020s10s
# spent 0s within ExtUtils::MakeMaker::BEGIN@10 which was called: # once (0s+0s) by main::BEGIN@1 at line 10
use ExtUtils::MakeMaker::version; # ensure we always have our fake version.pm
# spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@10
1120s20s
# spent 0s within ExtUtils::MakeMaker::BEGIN@11 which was called: # once (0s+0s) by main::BEGIN@1 at line 11
use Carp;
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@11
1220s231.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
use File::Path;
# spent 31.2ms making 1 call to ExtUtils::MakeMaker::BEGIN@12 # spent 0s making 1 call to Exporter::import
1320smy $CAN_DECODE = eval { require ExtUtils::MakeMaker::Locale; }; # 2 birds, 1 stone
1410seval { ExtUtils::MakeMaker::Locale::reinit('UTF-8') }
15 if $CAN_DECODE and $ExtUtils::MakeMaker::Locale::ENCODING_LOCALE eq 'US-ASCII';
16
1710sour $Verbose = 0; # exported
1810sour @Parent; # needs to be localized
1910sour @Get_from_Config; # referenced by MM_Unix
2010sour @MM_Sections;
2110sour @Overridable;
2210smy @Prepend_parent;
23my %Recognized_Att_Keys;
2410sour %macro_fsentity; # whether a macro is a filesystem name
2510sour %macro_dep; # whether a macro is a dependency
26
2710sour $VERSION = '7.04';
2810s$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]
# spent 0s executing statements in string eval
29
30# Emulate something resembling CVS $Revision$
3110s10s(our $Revision = $VERSION) =~ s{_}{};
# spent 0s making 1 call to ExtUtils::MakeMaker::CORE:subst
3210s$Revision = int $Revision * 10000;
33
3410sour $Filename = __FILE__; # referenced outside MakeMaker
35
3610sour @ISA = qw(Exporter);
3710sour @EXPORT = qw(&WriteMakefile $Verbose &prompt);
3810sour @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.
4310smy $Is_VMS = $^O eq 'VMS';
4410smy $Is_Win32 = $^O eq 'MSWin32';
4510smy $UNDER_CORE = $ENV{PERL_CORE};
46
4710s10sfull_setup();
# spent 0s making 1 call to ExtUtils::MakeMaker::full_setup
48
4910srequire ExtUtils::MM; # Things like CPAN assume loading ExtUtils::MakeMaker
50 # will give them MM.
51
5210srequire 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
sub WriteMakefile {
5830s croak "WriteMakefile: Need even number of args" if @_ % 2;
59
6030s require ExtUtils::MY;
6130s my %att = @_;
62
6330s30s _convert_compat_attrs(\%att);
# spent 0s making 3 calls to ExtUtils::MakeMaker::_convert_compat_attrs, avg 0s/call
64
6530s30s _verify_att(\%att);
# spent 0s making 3 calls to ExtUtils::MakeMaker::_verify_att, avg 0s/call
66
6730s362.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
6830s3125ms $mm->flush;
# spent 125ms making 3 calls to ExtUtils::MakeMaker::flush, avg 41.6ms/call
69
7030s 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.
7710smy %Att_Sigs;
7810smy %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
12410s@Att_Sigs{keys %Recognized_Att_Keys} = ('') x keys %Recognized_Att_Keys;
12510s@Att_Sigs{keys %Special_Sigs} = values %Special_Sigs;
126
127
# spent 0s within ExtUtils::MakeMaker::_convert_compat_attrs which was called 6 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::WriteMakefile at line 63, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 412, avg 0s/call
sub _convert_compat_attrs { #result of running several times should be same
12860s my($att) = @_;
12960s if (exists $att->{AUTHOR}) {
13020s if ($att->{AUTHOR}) {
13120s if (!ref($att->{AUTHOR})) {
13210s my $t = $att->{AUTHOR};
13310s $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
sub _verify_att {
14230s my($att) = @_;
143
14430s while( my($key, $val) = each %$att ) {
145180s my $sig = $Att_Sigs{$key};
146180s unless( defined $sig ) {
147 warn "WARNING: $key is not a known parameter.\n";
148 next;
149 }
150
151180s my @sigs = ref $sig ? @$sig : $sig;
152180s my $given = ref $val;
153390s210s 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
sub _is_of_type {
166210s my($thing, $type) = @_;
167
168210s return 1 if ref $thing eq $type;
169
17030s local $SIG{__DIE__};
17160s20s return 1 if eval{ $thing->isa($type) };
# spent 0s making 2 calls to UNIVERSAL::isa, avg 0s/call
172
17330s return 0;
174}
175
176
177sub _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
187sub 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
sub eval_in_subdirs {
21910s my($self) = @_;
22020s20s
# spent 0s within ExtUtils::MakeMaker::BEGIN@220 which was called: # once (0s+0s) by main::BEGIN@1 at line 220
use Cwd qw(cwd abs_path);
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@220
22110s10s my $pwd = cwd() || die "Can't figure out your cwd!";
# spent 0s making 1 call to Cwd::_win32_cwd
222
22360s100s 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
22410s push @INC, '.'; # '.' has to always be at the end of @INC
225
22610s foreach my $dir (@{$self->{DIR}}){
22720s20s my($abs) = $self->catdir($pwd,$dir);
# spent 0s making 2 calls to File::Spec::Win32::catdir, avg 0s/call
22840s238.6s eval { $self->eval_in_x($abs); };
# spent 38.6s making 2 calls to ExtUtils::MakeMaker::eval_in_x, avg 19.3s/call
22920s last if $@;
230 }
23110s10s chdir $pwd;
# spent 0s making 1 call to ExtUtils::MakeMaker::CORE:chdir
23210s 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
sub eval_in_x {
23620s my($self,$dir) = @_;
23720s20s 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 {
24020s package main;
24120s do './Makefile.PL';
242 };
24320s 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
25510smy $PACKNAME = 'PACK000';
256
257
# spent 0s within ExtUtils::MakeMaker::full_setup which was called: # once (0s+0s) by main::BEGIN@1 at line 47
sub full_setup {
25810s $Verbose ||= 0;
259
26010s my @dep_macros = qw/
261 PERL_INCDEP PERL_ARCHLIBDEP PERL_ARCHIVEDEP
262 /;
263
26410s 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
28610s 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 /;
31310s push @attrib_help, @fs_macros;
31410s @macro_fsentity{@fs_macros, @dep_macros} = (1) x (@fs_macros+@dep_macros);
31510s @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
32810s @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
35310s @Overridable = @MM_Sections;
35410s 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
36310s 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
37010s push @MM_Sections, "postamble";
37110s push @Overridable, "postamble";
372
373 # All sections are valid keys.
37410s @Recognized_Att_Keys{@MM_Sections} = (1) x @MM_Sections;
375
376 # we will use all these variables in the Makefile
37710s @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
38510s push @Get_from_Config, qw( vendorarchexp vendorlibexp ) if $] >= 5.006;
386
38710s foreach my $item (@attrib_help){
3881480s $Recognized_Att_Keys{$item} = 1;
389 }
39010s foreach my $item (@Get_from_Config) {
391220s $Recognized_Att_Keys{uc $item} = $Config{$item};
392220s 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 #
40110s @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
sub new {
40930s my($class,$self) = @_;
41030s my($key);
411
41230s30s _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()
41530s foreach my $k (keys %$self) {
416180s $self->{ARGS}{$k} = $self->{$k};
417 }
418
41930s $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.
42330s bless $self, "MM";
424
425 # Cleanup all the module requirement bits
42630s for my $key (qw(PREREQ_PM BUILD_REQUIRES CONFIGURE_REQUIRES TEST_REQUIRES)) {
427120s $self->{$key} ||= {};
428120s120s $self->clean_versions( $key );
# spent 0s making 12 calls to ExtUtils::MakeMaker::clean_versions, avg 0s/call
429 }
430
431
43230s30s 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.
43730s30s if ("@ARGV" =~ /\bPRINT_PREREQ\b/) {
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:match, avg 0s/call
438 $self->_PRINT_PREREQ;
439 }
440
44130s print "MakeMaker (v$VERSION)\n" if $Verbose;
44230s531.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
44630s30s check_hints($self);
# spent 0s making 3 calls to ExtUtils::MakeMaker::check_hints, avg 0s/call
447
44830s 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
46230s 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
46730s my $perl_version_ok = eval {
468 local $SIG{__WARN__} = sub {
469 # simulate "use warnings FATAL => 'all'" for vintage perls
470 die @_;
47130s };
47230s !$self->{MIN_PERL_VERSION} or $self->{MIN_PERL_VERSION} <= $]
473 };
47430s if (!$perl_version_ok) {
475 if (!defined $perl_version_ok) {
476 die <<'END';
477Warning: MIN_PERL_VERSION is not in a recognized format.
478Recommended is a quoted numerical value like '5.005' or '5.008001'.
479END
480 }
481 elsif ($self->{PREREQ_FATAL}) {
482 die sprintf <<"END", $self->{MIN_PERL_VERSION}, $];
483MakeMaker FATAL: perl version too low for this distribution.
484Required is %s. We run %s.
485END
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
49430s my %configure_att; # record &{$self->{CONFIGURE}} attributes
49530s my(%initial_att) = %$self; # record initial attributes
496
49730s my(%unsatisfied) = ();
49830s30s my $prereqs = $self->_all_prereqs;
# spent 0s making 3 calls to ExtUtils::MM_Any::_all_prereqs, avg 0s/call
49930s30s 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
54230s if (%unsatisfied && $self->{PREREQ_FATAL}){
543 my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
544 sort { $a cmp $b } keys %unsatisfied;
545 die <<"END";
546MakeMaker FATAL: prerequisites not found.
547$failedprereqs
548
549Please install these modules first and rerun 'perl Makefile.PL'.
550END
551 }
552
55330s 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
56430s60s 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
56830s my $newclass = ++$PACKNAME;
56930s local @Parent = @Parent; # Protect against non-local exits
570 {
57160s print "Blessing Object into class [$newclass]\n" if $Verbose>=2;
57230s30s mv_all_methods("MY",$newclass);
# spent 0s making 3 calls to ExtUtils::MakeMaker::mv_all_methods, avg 0s/call
57330s bless $self, $newclass;
57430s push @Parent, $self;
57530s require ExtUtils::MY;
576
577215.6ms20s
# spent 0s within ExtUtils::MakeMaker::BEGIN@577 which was called: # once (0s+0s) by main::BEGIN@1 at line 577
no strict 'refs'; ## no critic;
# spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@577 # spent 0s making 1 call to strict::unimport
57830s @{"$newclass\:\:ISA"} = 'MM';
579 }
580
58130s if (defined $Parent[-2]){
58220s $self->{PARENT} = $Parent[-2];
58320s for my $key (@Prepend_parent) {
584200s next unless defined $self->{PARENT}{$key};
585
586 # Don't stomp on WriteMakefile() args.
587180s next if defined $self->{ARGS}{$key} and
588 $self->{ARGS}{$key} eq $self->{$key};
589
590180s $self->{$key} = $self->{PARENT}{$key};
591
592180s 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 {
603180s my $value = $self->{$key};
604 # not going to test in FS so only stripping start
605180s220s $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
606180s320s $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);
608180s180s $value = qq{"$value} if $key =~ /PERL$/;
# spent 0s making 18 calls to ExtUtils::MakeMaker::CORE:match, avg 0s/call
609180s $self->{$key} = $value;
610 }
611 }
61220s if ($self->{PARENT}) {
61320s $self->{PARENT}->{CHILDREN}->{$newclass} = $self;
61420s foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE LD OPTIMIZE)) {
615100s 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 }
62320s my @fm = grep /^FIRST_MAKEFILE=/, @ARGV;
62420s parse_args($self,@fm) if @fm;
625 }
626 else {
62710s20s 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
63130s if (%unsatisfied && $self->{PREREQ_FATAL}){
632 my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
633 sort { $a cmp $b } keys %unsatisfied;
634 die <<"END";
635MakeMaker FATAL: prerequisites not found.
636$failedprereqs
637
638Please install these modules first and rerun 'perl Makefile.PL'.
639END
640 }
641
64230s $self->{NAME} ||= $self->guess_name;
643
64430s30s 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
64730s30s ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g;
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call
648
64930s30s $self->init_MAKE;
# spent 0s making 3 calls to ExtUtils::MM_Any::init_MAKE, avg 0s/call
65030s30s $self->init_main;
# spent 0s making 3 calls to ExtUtils::MM_Unix::init_main, avg 0s/call
65130s315.6ms $self->init_VERSION;
# spent 15.6ms making 3 calls to ExtUtils::MM_Any::init_VERSION, avg 5.20ms/call
65230s30s $self->init_dist;
# spent 0s making 3 calls to ExtUtils::MM_Unix::init_dist, avg 0s/call
65330s30s $self->init_INST;
# spent 0s making 3 calls to ExtUtils::MM_Any::init_INST, avg 0s/call
65430s30s $self->init_INSTALL;
# spent 0s making 3 calls to ExtUtils::MM_Any::init_INSTALL, avg 0s/call
65530s30s $self->init_DEST;
# spent 0s making 3 calls to ExtUtils::MM_Unix::init_DEST, avg 0s/call
65630s30s $self->init_dirscan;
# spent 0s making 3 calls to ExtUtils::MM_Unix::init_dirscan, avg 0s/call
65730s30s $self->init_PM;
# spent 0s making 3 calls to ExtUtils::MM_Unix::init_PM, avg 0s/call
65830s30s $self->init_MANPODS;
# spent 0s making 3 calls to ExtUtils::MM_Unix::init_MANPODS, avg 0s/call
65930s315.6ms $self->init_xs;
# spent 15.6ms making 3 calls to ExtUtils::MM_Unix::init_xs, avg 5.20ms/call
66030s393.6ms $self->init_PERL;
# spent 93.6ms making 3 calls to ExtUtils::MM_Unix::init_PERL, avg 31.2ms/call
66130s31.11s $self->init_DIRFILESEP;
# spent 1.11s making 3 calls to ExtUtils::MM_Win32::init_DIRFILESEP, avg 369ms/call
66230s30s $self->init_linker;
# spent 0s making 3 calls to ExtUtils::MM_Win32::init_linker, avg 0s/call
66330s30s $self->init_ABSTRACT;
# spent 0s making 3 calls to ExtUtils::MM_Any::init_ABSTRACT, avg 0s/call
664
66530s60s $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
67030s310.4s $self->init_tools();
# spent 10.4s making 3 calls to ExtUtils::MM_Win32::init_tools, avg 3.46s/call
67130s346.8ms $self->init_others();
# spent 46.8ms making 3 calls to ExtUtils::MM_Win32::init_others, avg 15.6ms/call
67230s30s $self->init_platform();
# spent 0s making 3 calls to ExtUtils::MM_Win32::init_platform, avg 0s/call
67330s30s $self->init_PERM();
# spent 0s making 3 calls to ExtUtils::MM_Unix::init_PERM, avg 0s/call
67430s30s my($argv) = neatvalue(\@ARGV);
# spent 0s making 3 calls to ExtUtils::MakeMaker::neatvalue, avg 0s/call
67530s30s $argv =~ s/^\[/(/;
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call
67630s30s $argv =~ s/\]$/)/;
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call
677
67830s 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#
689END
690
69130s30s push @{$self->{RESULT}}, $self->_MakeMaker_Parameters_section(\%initial_att);
# spent 0s making 3 calls to ExtUtils::MakeMaker::_MakeMaker_Parameters_section, avg 0s/call
692
69330s if (defined $self->{CONFIGURE}) {
694 push @{$self->{RESULT}}, <<END;
695
696# MakeMaker 'CONFIGURE' Parameters:
697END
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
71530s for my $skip (@{$self->{SKIP} || []}) {
716 $self->{SKIPHASH}{$skip} = 1;
717 }
71830s delete $self->{SKIP}; # free memory
719
72030s if ($self->{PARENT}) {
721 for (qw/install dist dist_basics dist_core distdir dist_test dist_ci/) {
722140s $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!
72830s138.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
73230s foreach my $section ( @MM_Sections ){
733 # Support for new foo_target() methods.
7341680s my $method = $section;
7351680s1680s $method .= '_target' unless $self->can($method);
# spent 0s making 168 calls to UNIVERSAL::can, avg 0s/call
736
7371680s print "Processing Makefile '$section' section\n" if ($Verbose >= 2);
7381680s1680s my($skipit) = $self->skipcheck($section);
# spent 0s making 168 calls to ExtUtils::MakeMaker::skipcheck, avg 0s/call
7391680s if ($skipit){
740 push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit.";
741 } else {
7421540s my(%a) = %{$self->{$section} || {}};
7431540s push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:";
7441540s push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a;
7451540s30850.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
75130s push @{$self->{RESULT}}, "\n# End.";
752
75330s $self;
754}
755
756sub 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';
772all :
773
774clean :
775
776install :
777
778makemakerdflt :
779
780test :
781
782EOP
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
793Return the first installed .pm $file associated with the $module. The
794one 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
802sub _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
sub _MakeMaker_Parameters_section {
82430s my $self = shift;
82530s my $att = shift;
826
82730s my @result = <<'END';
828# MakeMaker Parameters:
829END
830
83130s30s foreach my $key (sort keys %$att){
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:sort, avg 0s/call
832320s next if $key eq 'ARGS';
833290s my $v;
834290s30s 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 {
843260s260s $v = neatvalue($att->{$key});
# spent 0s making 26 calls to ExtUtils::MakeMaker::neatvalue, avg 0s/call
844 }
845
846290s290s $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
# spent 0s making 29 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call
847290s $v =~ tr/\n/ /s;
848290s push @result, "# $key => $v";
849 }
850
85130s 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
sub _shellwords {
85610s my (@lines) = @_;
85710s my @allwords;
858
85910s foreach my $line (@lines) {
86010s10s $line =~ s/^\s+//;
# spent 0s making 1 call to ExtUtils::MakeMaker::CORE:subst
86110s10s my @words = _parse_line('\s+', 0, $line);
# spent 0s making 1 call to ExtUtils::MakeMaker::_parse_line
86210s pop @words if (@words and !defined $words[-1]);
86310s return() unless (@words || !length($line));
86410s push(@allwords, @words);
865 }
86610s 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
sub _parse_line {
87010s my($delimiter, $keep, $line) = @_;
87110s my($word, @pieces);
872
87320s20s
# spent 0s within ExtUtils::MakeMaker::BEGIN@873 which was called: # once (0s+0s) by main::BEGIN@1 at line 873
no warnings 'uninitialized'; # we will be testing undef strings
# spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@873 # spent 0s making 1 call to warnings::unimport
874
87510s 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 }
92910s 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
sub check_manifest {
93310s10s print "Checking if your kit is complete...\n";
# spent 0s making 1 call to ExtUtils::MakeMaker::CORE:print
93410s require ExtUtils::Manifest;
935 # avoid warning
93610s $ExtUtils::Manifest::Quiet = $ExtUtils::Manifest::Quiet = 1;
93710s115.6ms my(@missed) = ExtUtils::Manifest::manicheck();
# spent 15.6ms making 1 call to ExtUtils::Manifest::manicheck
93810s 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 {
94410s10s 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
sub parse_args{
94910s my($self, @args) = @_;
95010s @args = map { Encode::decode(locale => $_) } @args if $CAN_DECODE;
95110s 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'
97010s 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'
98110s 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 }
98910s 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
99510s 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
100210s 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
100610s if (defined $self->{EXCLUDE_EXT} && ref \$self->{EXCLUDE_EXT} eq 'SCALAR') {
1007 $self->{EXCLUDE_EXT} = [grep $_, split '\s+', $self->{EXCLUDE_EXT}];
1008 }
1009
101010s10s foreach my $mmkey (sort keys %$self){
# spent 0s making 1 call to ExtUtils::MakeMaker::CORE:sort
1011140s next if $mmkey eq 'ARGS';
1012130s print " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose;
1013130s print "'$mmkey' is not a known MakeMaker parameter name.\n"
1014 unless exists $Recognized_Att_Keys{$mmkey};
1015 }
101610s $| = 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
sub check_hints {
102030s my($self) = @_;
1021 # We allow extension-specific hints files.
1022
102330s require File::Spec;
102430s30s my $curdir = File::Spec->curdir;
# spent 0s making 3 calls to File::Spec::Unix::curdir, avg 0s/call
1025
102630s30s my $hint_dir = File::Spec->catdir($curdir, "hints");
# spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call
102730s30s 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
1048sub _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
sub mv_all_methods {
106730s 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/
107730s };
107830s 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
10882160s next unless defined &{"${from}::$method"};
1089
1090 {
109150s20s
# spent 0s within ExtUtils::MakeMaker::BEGIN@1091 which was called: # once (0s+0s) by main::BEGIN@1 at line 1091
no strict 'refs'; ## no critic
# spent 0s making 1 call to ExtUtils::MakeMaker::BEGIN@1091 # spent 0s making 1 call to strict::unimport
109230s *{"${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 {
110030s package MY;
110130s my $super = "SUPER::".$method;
1102 *{$method} = sub {
1103 shift->$super(@_);
110430s };
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
sub skipcheck {
11291680s my($self) = shift;
11301680s my($section) = @_;
11311680s if ($section eq 'dynamic') {
113230s print "Warning (non-fatal): Target 'dynamic' depends on targets ",
1133 "in skipped section 'dynamic_bs'\n"
1134 if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
113530s print "Warning (non-fatal): Target 'dynamic' depends on targets ",
1136 "in skipped section 'dynamic_lib'\n"
1137 if $self->{SKIPHASH}{dynamic_lib} && $Verbose;
1138 }
11391680s 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 }
11441680s 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 }
11491680s return 'skipped' if $self->{SKIPHASH}{$section};
11501540s 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
sub flush {
115430s my $self = shift;
1155
1156 # This needs a bit more work for more wacky OSen
115730s my $type = 'Unix-style';
115830s30s if ( $self->os_flavor_is('Win32') ) {
# spent 0s making 3 calls to ExtUtils::MM_Any::os_flavor_is, avg 0s/call
115930s30s my $make = $self->make;
# spent 0s making 3 calls to ExtUtils::MM_Any::make, avg 0s/call
116030s30s $make = +( File::Spec->splitpath( $make ) )[-1];
# spent 0s making 3 calls to File::Spec::Win32::splitpath, avg 0s/call
116130s30s $make =~ s!\.exe$!!i;
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:subst, avg 0s/call
116230s $type = $make . '-style';
1163 }
1164 elsif ( $Is_VMS ) {
1165 $type = $Config{make} . '-style';
1166 }
1167
116830s my $finalname = $self->{MAKEFILE};
116930s30s print "Generating a $type $finalname\n";
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:print, avg 0s/call
117030s30s print "Writing $finalname for $self->{NAME}\n";
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:print, avg 0s/call
1171
117230s30s unlink($finalname, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : ());
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:unlink, avg 0s/call
117330s30s 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: $!";
117550s130s 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
117730s for my $chunk (@{$self->{RESULT}}) {
11783600s my $to_write = "$chunk\n";
11793600s if (!$CAN_DECODE && $] > 5.008) {
1180 utf8::encode $to_write;
1181 }
11823600s4500s 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
118630s60s 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: $!";
118830s30s _rename("MakeMaker.tmp", $finalname) or
# spent 0s making 3 calls to ExtUtils::MakeMaker::_rename, avg 0s/call
1189 warn "rename MakeMaker.tmp => $finalname: $!";
119030s30s chmod 0644, $finalname unless $Is_VMS;
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:chmod, avg 0s/call
1191
119230s9125ms 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 }
119930s my %keep = map { ($_ => 1) } qw(NEEDS_LINKING HAS_LINK_CODE);
120030s if ($self->{PARENT} && !$self->{_KEEP_AFTER_FLUSH}) {
1201 foreach (keys %$self) { # safe memory
12024320s delete $self->{$_} unless $keep{$_};
1203 }
1204 }
1205
120630s30s 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
sub _rename {
121130s my($src, $dest) = @_;
121230s30s chmod 0666, $dest;
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:chmod, avg 0s/call
121330s30s unlink $dest;
# spent 0s making 3 calls to ExtUtils::MakeMaker::CORE:unlink, avg 0s/call
121430s30s 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.
1218sub _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.
1228sub 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 !!!
1233END
1234}
1235
1236# Ditto for mksymlists() as of MakeMaker 5.17
1237sub 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 !!!
1242END
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
sub neatvalue {
1246520s my($v) = @_;
1247520s return "undef" unless defined $v;
1248500s my($t) = ref $v;
1249500s return "q[$v]" unless $t;
1250340s if ($t eq 'ARRAY') {
1251110s my(@m, @neat);
1252110s push @m, "[";
1253110s foreach my $elem (@$v) {
125420s push @neat, "q[$elem]";
1255 }
1256110s push @m, join ", ", @neat;
1257110s push @m, "]";
1258110s return join "", @m;
1259 }
1260230s return $v unless $t eq 'HASH';
1261230s my(@m, $key, $val);
1262230s230s for my $key (sort keys %$v) {
# spent 0s making 23 calls to ExtUtils::MakeMaker::CORE:sort, avg 0s/call
126380s last unless defined $key; # cautious programming in case (undef,undef) is true
126480s80s 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 }
1266230s return "{ ".join(', ',@m)." }";
1267}
1268
1269sub _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
sub clean_versions {
1293120s my($self, $key) = @_;
1294120s my $reqs = $self->{$key};
1295120s 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
sub selfdocument {
132030s my($self) = @_;
132130s my(@m);
132230s 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 }
133230s join "\n", @m;
1333}
1334
133510s1;
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:binmode; # opcode
# spent 0s within ExtUtils::MakeMaker::CORE:chdir which was called 3 times, avg 0s/call: # 2 times (0s+0s) by ExtUtils::MakeMaker::eval_in_x at line 237, avg 0s/call # once (0s+0s) by ExtUtils::MakeMaker::eval_in_subdirs at line 231
sub ExtUtils::MakeMaker::CORE:chdir; # opcode
# spent 0s within ExtUtils::MakeMaker::CORE:chmod which was called 6 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1190, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::_rename at line 1212, avg 0s/call
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
sub ExtUtils::MakeMaker::CORE:close; # opcode
# 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
sub ExtUtils::MakeMaker::CORE:ftdir; # opcode
# 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
sub ExtUtils::MakeMaker::CORE:ftfile; # opcode
# 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
sub ExtUtils::MakeMaker::CORE:ftis; # opcode
# 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
sub ExtUtils::MakeMaker::CORE:match; # opcode
# 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
sub ExtUtils::MakeMaker::CORE:open; # opcode
# 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
sub ExtUtils::MakeMaker::CORE:print; # opcode
# 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
sub ExtUtils::MakeMaker::CORE:rename; # opcode
# 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
sub ExtUtils::MakeMaker::CORE:sort; # opcode
# 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:subst; # opcode
# spent 0s within ExtUtils::MakeMaker::CORE:unlink which was called 6 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1172, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::_rename at line 1213, avg 0s/call
sub ExtUtils::MakeMaker::CORE:unlink; # opcode