← 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:02 2015

FilenameC:/tmp64ng/perl/lib/ExtUtils/MM_Any.pm
StatementsExecuted 14955 statements in 61.8s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3331161.7s61.7sExtUtils::MM_Any::::CORE:backtickExtUtils::MM_Any::CORE:backtick (opcode)
6723216.6ms16.6msExtUtils::MM_Any::::makeExtUtils::MM_Any::make
1110s15.6msExtUtils::MM_Any::::BEGIN@12ExtUtils::MM_Any::BEGIN@12
1110s0sExtUtils::MM_Any::::BEGIN@14ExtUtils::MM_Any::BEGIN@14
1110s0sExtUtils::MM_Any::::BEGIN@3ExtUtils::MM_Any::BEGIN@3
1110s0sExtUtils::MM_Any::::BEGIN@6ExtUtils::MM_Any::BEGIN@6
1110s0sExtUtils::MM_Any::::BEGIN@7ExtUtils::MM_Any::BEGIN@7
1110s0sExtUtils::MM_Any::::BEGIN@8ExtUtils::MM_Any::BEGIN@8
1110s0sExtUtils::MM_Any::::BEGIN@9ExtUtils::MM_Any::BEGIN@9
3110s0sExtUtils::MM_Any::::CORE:closedirExtUtils::MM_Any::CORE:closedir (opcode)
1110s0sExtUtils::MM_Any::::CORE:ftdirExtUtils::MM_Any::CORE:ftdir (opcode)
3110s0sExtUtils::MM_Any::::CORE:ftfileExtUtils::MM_Any::CORE:ftfile (opcode)
8110s0sExtUtils::MM_Any::::CORE:ftisExtUtils::MM_Any::CORE:ftis (opcode)
9701110s0sExtUtils::MM_Any::::CORE:matchExtUtils::MM_Any::CORE:match (opcode)
3110s0sExtUtils::MM_Any::::CORE:open_dirExtUtils::MM_Any::CORE:open_dir (opcode)
3110s0sExtUtils::MM_Any::::CORE:readdirExtUtils::MM_Any::CORE:readdir (opcode)
336110s0sExtUtils::MM_Any::::CORE:regcompExtUtils::MM_Any::CORE:regcomp (opcode)
24610s0sExtUtils::MM_Any::::CORE:sortExtUtils::MM_Any::CORE:sort (opcode)
16791110s0sExtUtils::MM_Any::::CORE:substExtUtils::MM_Any::CORE:subst (opcode)
30110s0sExtUtils::MM_Any::::CORE:substcontExtUtils::MM_Any::CORE:substcont (opcode)
3110s0sExtUtils::MM_Any::::POD2MAN_macroExtUtils::MM_Any::POD2MAN_macro
0000s0sExtUtils::MM_Any::::_PREREQ_PRINTExtUtils::MM_Any::_PREREQ_PRINT
0000s0sExtUtils::MM_Any::::_PRINT_PREREQExtUtils::MM_Any::_PRINT_PREREQ
0000s0sExtUtils::MM_Any::::__ANON__[:1300]ExtUtils::MM_Any::__ANON__[:1300]
0000s0sExtUtils::MM_Any::::__ANON__[:2680]ExtUtils::MM_Any::__ANON__[:2680]
6210s0sExtUtils::MM_Any::::_add_requirements_to_meta_v1_4ExtUtils::MM_Any::_add_requirements_to_meta_v1_4
2210s0sExtUtils::MM_Any::::_add_requirements_to_meta_v2ExtUtils::MM_Any::_add_requirements_to_meta_v2
3110s0sExtUtils::MM_Any::::_all_prereqsExtUtils::MM_Any::_all_prereqs
0000s0sExtUtils::MM_Any::::_dump_hashExtUtils::MM_Any::_dump_hash
15110s0sExtUtils::MM_Any::::_expand_macrosExtUtils::MM_Any::_expand_macros
3110s0sExtUtils::MM_Any::::_fix_libsExtUtils::MM_Any::_fix_libs
6210s0sExtUtils::MM_Any::::_fix_metadata_before_conversionExtUtils::MM_Any::_fix_metadata_before_conversion
15410s31.2msExtUtils::MM_Any::::_has_cpan_metaExtUtils::MM_Any::_has_cpan_meta
3210s0sExtUtils::MM_Any::::_hash_mergeExtUtils::MM_Any::_hash_merge (recurses: max depth 1, inclusive time 0s)
5110s0sExtUtils::MM_Any::::_metaspec_versionExtUtils::MM_Any::_metaspec_version
3110s15.6msExtUtils::MM_Any::::_mymeta_from_metaExtUtils::MM_Any::_mymeta_from_meta
5110s0sExtUtils::MM_Any::::_normalize_versionExtUtils::MM_Any::_normalize_version
3110s0sExtUtils::MM_Any::::_perl_header_filesExtUtils::MM_Any::_perl_header_files
3110s0sExtUtils::MM_Any::::_perl_header_files_fragmentExtUtils::MM_Any::_perl_header_files_fragment
0000s0sExtUtils::MM_Any::::_sort_pairsExtUtils::MM_Any::_sort_pairs
3110s0sExtUtils::MM_Any::::all_targetExtUtils::MM_Any::all_target
3110s0sExtUtils::MM_Any::::arch_checkExtUtils::MM_Any::arch_check
0000s0sExtUtils::MM_Any::::blessedExtUtils::MM_Any::blessed
3110s0sExtUtils::MM_Any::::blibdirs_targetExtUtils::MM_Any::blibdirs_target
0000s0sExtUtils::MM_Any::::can_dep_spaceExtUtils::MM_Any::can_dep_space
3110s0sExtUtils::MM_Any::::can_load_xsExtUtils::MM_Any::can_load_xs
333110s0sExtUtils::MM_Any::::can_redirect_errorExtUtils::MM_Any::can_redirect_error
0000s0sExtUtils::MM_Any::::can_runExtUtils::MM_Any::can_run
831930s15.6msExtUtils::MM_Any::::catfileExtUtils::MM_Any::catfile
3110s0sExtUtils::MM_Any::::cleanExtUtils::MM_Any::clean
3110s359msExtUtils::MM_Any::::clean_subdirs_targetExtUtils::MM_Any::clean_subdirs_target
3110s0sExtUtils::MM_Any::::dir_targetExtUtils::MM_Any::dir_target
1110s187msExtUtils::MM_Any::::dist_testExtUtils::MM_Any::dist_test
1110s0sExtUtils::MM_Any::::distdirExtUtils::MM_Any::distdir
3110s2.22sExtUtils::MM_Any::::distmeta_targetExtUtils::MM_Any::distmeta_target
3110s2.22sExtUtils::MM_Any::::distsignature_targetExtUtils::MM_Any::distsignature_target
3110s0sExtUtils::MM_Any::::dynamicExtUtils::MM_Any::dynamic
12420s39.7sExtUtils::MM_Any::::echoExtUtils::MM_Any::echo
210110s0sExtUtils::MM_Any::::escape_all_dollarsignsExtUtils::MM_Any::escape_all_dollarsigns
82110s0sExtUtils::MM_Any::::escape_dollarsignsExtUtils::MM_Any::escape_dollarsigns
0000s0sExtUtils::MM_Any::::extra_clean_filesExtUtils::MM_Any::extra_clean_files
1110s0sExtUtils::MM_Any::::find_testsExtUtils::MM_Any::find_tests
0000s0sExtUtils::MM_Any::::find_tests_recursiveExtUtils::MM_Any::find_tests_recursive
3110s0sExtUtils::MM_Any::::init_ABSTRACTExtUtils::MM_Any::init_ABSTRACT
3110s0sExtUtils::MM_Any::::init_INSTExtUtils::MM_Any::init_INST
3110s0sExtUtils::MM_Any::::init_INSTALLExtUtils::MM_Any::init_INSTALL
0000s0sExtUtils::MM_Any::::init_INSTALL_from_INSTALL_BASEExtUtils::MM_Any::init_INSTALL_from_INSTALL_BASE
3110s0sExtUtils::MM_Any::::init_INSTALL_from_PREFIXExtUtils::MM_Any::init_INSTALL_from_PREFIX
3110s0sExtUtils::MM_Any::::init_MAKEExtUtils::MM_Any::init_MAKE
3110s15.6msExtUtils::MM_Any::::init_VERSIONExtUtils::MM_Any::init_VERSION
3110s46.8msExtUtils::MM_Any::::init_othersExtUtils::MM_Any::init_others
0000s0sExtUtils::MM_Any::::init_platformExtUtils::MM_Any::init_platform
3110s10.4sExtUtils::MM_Any::::init_toolsExtUtils::MM_Any::init_tools
6210s0sExtUtils::MM_Any::::installvarsExtUtils::MM_Any::installvars
336720s61.8sExtUtils::MM_Any::::is_make_typeExtUtils::MM_Any::is_make_type
15110s0sExtUtils::MM_Any::::libscanExtUtils::MM_Any::libscan
3110s0sExtUtils::MM_Any::::makemakerdflt_targetExtUtils::MM_Any::makemakerdflt_target
154110s0sExtUtils::MM_Any::::maketext_filterExtUtils::MM_Any::maketext_filter
3110s0sExtUtils::MM_Any::::manifypodsExtUtils::MM_Any::manifypods
3110s0sExtUtils::MM_Any::::manifypods_targetExtUtils::MM_Any::manifypods_target
0000s0sExtUtils::MM_Any::::maxExtUtils::MM_Any::max
5210s0sExtUtils::MM_Any::::metafile_dataExtUtils::MM_Any::metafile_data
0000s0sExtUtils::MM_Any::::metafile_fileExtUtils::MM_Any::metafile_file
3110s35.4sExtUtils::MM_Any::::metafile_targetExtUtils::MM_Any::metafile_target
0000s0sExtUtils::MM_Any::::minExtUtils::MM_Any::min
3110s15.6msExtUtils::MM_Any::::mymetaExtUtils::MM_Any::mymeta
1002220s0sExtUtils::MM_Any::::os_flavor_isExtUtils::MM_Any::os_flavor_is
0000s0sExtUtils::MM_Any::::platform_constantsExtUtils::MM_Any::platform_constants
13110s0sExtUtils::MM_Any::::quote_depExtUtils::MM_Any::quote_dep
3110s0sExtUtils::MM_Any::::realcleanExtUtils::MM_Any::realclean
3110s749msExtUtils::MM_Any::::realclean_subdirs_targetExtUtils::MM_Any::realclean_subdirs_target
3110s0sExtUtils::MM_Any::::signature_targetExtUtils::MM_Any::signature_target
3110s0sExtUtils::MM_Any::::special_targetsExtUtils::MM_Any::special_targets
21620s0sExtUtils::MM_Any::::split_commandExtUtils::MM_Any::split_command
2210s0sExtUtils::MM_Any::::test_via_harnessExtUtils::MM_Any::test_via_harness
6210s0sExtUtils::MM_Any::::test_via_scriptExtUtils::MM_Any::test_via_script
3110s562msExtUtils::MM_Any::::tool_autosplitExtUtils::MM_Any::tool_autosplit
3110s0sExtUtils::MM_Any::::tools_otherExtUtils::MM_Any::tools_other
24210s0sExtUtils::MM_Any::::wraplistExtUtils::MM_Any::wraplist
3110s109msExtUtils::MM_Any::::write_mymetaExtUtils::MM_Any::write_mymeta
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package ExtUtils::MM_Any;
2
320s20s
# spent 0s within ExtUtils::MM_Any::BEGIN@3 which was called: # once (0s+0s) by main::BEGIN@1 at line 3
use strict;
# spent 0s making 1 call to ExtUtils::MM_Any::BEGIN@3 # spent 0s making 1 call to strict::import
410sour $VERSION = '7.04';
5
620s20s
# spent 0s within ExtUtils::MM_Any::BEGIN@6 which was called: # once (0s+0s) by main::BEGIN@1 at line 6
use Carp;
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MM_Any::BEGIN@6
720s10s
# spent 0s within ExtUtils::MM_Any::BEGIN@7 which was called: # once (0s+0s) by main::BEGIN@1 at line 7
use File::Spec;
# spent 0s making 1 call to ExtUtils::MM_Any::BEGIN@7
820s20s
# spent 0s within ExtUtils::MM_Any::BEGIN@8 which was called: # once (0s+0s) by main::BEGIN@1 at line 8
use File::Basename;
# spent 0s making 1 call to Exporter::import # spent 0s making 1 call to ExtUtils::MM_Any::BEGIN@8
910s10s
# spent 0s within ExtUtils::MM_Any::BEGIN@9 which was called: # once (0s+0s) by main::BEGIN@1 at line 9
BEGIN { our @ISA = qw(File::Spec); }
# spent 0s making 1 call to ExtUtils::MM_Any::BEGIN@9
10
11# We need $Verbose
1220s231.2ms
# spent 15.6ms (0s+15.6) within ExtUtils::MM_Any::BEGIN@12 which was called: # once (0s+15.6ms) by main::BEGIN@1 at line 12
use ExtUtils::MakeMaker qw($Verbose);
# spent 15.6ms making 1 call to Exporter::import # spent 15.6ms making 1 call to ExtUtils::MM_Any::BEGIN@12
13
14215.6ms20s
# spent 0s within ExtUtils::MM_Any::BEGIN@14 which was called: # once (0s+0s) by main::BEGIN@1 at line 14
use ExtUtils::MakeMaker::Config;
# spent 0s making 1 call to ExtUtils::MM_Any::BEGIN@14 # spent 0s making 1 call to ExtUtils::MakeMaker::Config::import
15
16
17# So we don't have to keep calling the methods over and over again,
18# we have these globals to cache the values. Faster and shrtr.
1910s10smy $Curdir = __PACKAGE__->curdir;
# spent 0s making 1 call to File::Spec::Unix::curdir
2010s10smy $Rootdir = __PACKAGE__->rootdir;
# spent 0s making 1 call to File::Spec::Win32::rootdir
2110s10smy $Updir = __PACKAGE__->updir;
# spent 0s making 1 call to File::Spec::Unix::updir
22
23
24=head1 NAME
25
26ExtUtils::MM_Any - Platform-agnostic MM methods
27
28=head1 SYNOPSIS
29
30 FOR INTERNAL USE ONLY!
31
32 package ExtUtils::MM_SomeOS;
33
34 # Temporarily, you have to subclass both. Put MM_Any first.
35 require ExtUtils::MM_Any;
36 require ExtUtils::MM_Unix;
37 @ISA = qw(ExtUtils::MM_Any ExtUtils::Unix);
38
39=head1 DESCRIPTION
40
41B<FOR INTERNAL USE ONLY!>
42
43ExtUtils::MM_Any is a superclass for the ExtUtils::MM_* set of
44modules. It contains methods which are either inherently
45cross-platform or are written in a cross-platform manner.
46
47Subclass off of ExtUtils::MM_Any I<and> ExtUtils::MM_Unix. This is a
48temporary solution.
49
50B<THIS MAY BE TEMPORARY!>
51
52
53=head1 METHODS
54
55Any methods marked I<Abstract> must be implemented by subclasses.
56
57
58=head2 Cross-platform helper methods
59
60These are methods which help writing cross-platform code.
61
- -
64=head3 os_flavor I<Abstract>
65
66 my @os_flavor = $mm->os_flavor;
67
68@os_flavor is the style of operating system this is, usually
69corresponding to the MM_*.pm file we're using.
70
71The first element of @os_flavor is the major family (ie. Unix,
72Windows, VMS, OS/2, etc...) and the rest are sub families.
73
74Some examples:
75
76 Cygwin98 ('Unix', 'Cygwin', 'Cygwin9x')
77 Windows ('Win32')
78 Win98 ('Win32', 'Win9x')
79 Linux ('Unix', 'Linux')
80 MacOS X ('Unix', 'Darwin', 'MacOS', 'MacOS X')
81 OS/2 ('OS/2')
82
83This is used to write code for styles of operating system.
84See os_flavor_is() for use.
85
86
87=head3 os_flavor_is
88
89 my $is_this_flavor = $mm->os_flavor_is($this_flavor);
90 my $is_this_flavor = $mm->os_flavor_is(@one_of_these_flavors);
91
92Checks to see if the current operating system is one of the given flavors.
93
94This is useful for code like:
95
96 if( $mm->os_flavor_is('Unix') ) {
97 $out = `foo 2>&1`;
98 }
99 else {
100 $out = `foo`;
101 }
102
103=cut
104
105
# spent 0s within ExtUtils::MM_Any::os_flavor_is which was called 1002 times, avg 0s/call: # 999 times (0s+0s) by ExtUtils::MM_Any::can_redirect_error at line 186, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1158 of ExtUtils/MakeMaker.pm, avg 0s/call
sub os_flavor_is {
10610020s my $self = shift;
10710020s10020s my %flavors = map { ($_ => 1) } $self->os_flavor;
# spent 0s making 1002 calls to ExtUtils::MM_Win32::os_flavor, avg 0s/call
10810020s return (grep { $flavors{$_} } @_) ? 1 : 0;
109}
110
111
112=head3 can_load_xs
113
114 my $can_load_xs = $self->can_load_xs;
115
116Returns true if we have the ability to load XS.
117
118This is important because miniperl, used to build XS modules in the
119core, can not load XS.
120
121=cut
122
123
# spent 0s within ExtUtils::MM_Any::can_load_xs which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Win32::arch_check at line 485 of ExtUtils/MM_Win32.pm, avg 0s/call
sub can_load_xs {
12430s return defined &DynaLoader::boot_DynaLoader ? 1 : 0;
125}
126
127
128=head3 can_run
129
130 use ExtUtils::MM;
131 my $runnable = MM->can_run($Config{make});
132
133If called in a scalar context it will return the full path to the binary
134you asked for if it was found, or C<undef> if it was not.
135
136If called in a list context, it will return a list of the full paths to instances
137of the binary where found in C<PATH>, or an empty list if it was not found.
138
139Copied from L<IPC::Cmd|IPC::Cmd/"$path = can_run( PROGRAM );">, but modified into
140a method (and removed C<$INSTANCES> capability).
141
142=cut
143
144sub can_run {
145 my ($self, $command) = @_;
146
147 # a lot of VMS executables have a symbol defined
148 # check those first
149 if ( $^O eq 'VMS' ) {
150 require VMS::DCLsym;
151 my $syms = VMS::DCLsym->new;
152 return $command if scalar $syms->getsym( uc $command );
153 }
154
155 my @possibles;
156
157 if( File::Spec->file_name_is_absolute($command) ) {
158 return $self->maybe_command($command);
159
160 } else {
161 for my $dir (
162 File::Spec->path,
163 File::Spec->curdir
164 ) {
165 next if ! $dir || ! -d $dir;
166 my $abs = File::Spec->catfile($self->os_flavor_is('Win32') ? Win32::GetShortPathName( $dir ) : $dir, $command);
167 push @possibles, $abs if $abs = $self->maybe_command($abs);
168 }
169 }
170 return @possibles if wantarray;
171 return shift @possibles;
172}
173
174
175=head3 can_redirect_error
176
177 $useredirect = MM->can_redirect_error;
178
179True if on an OS where qx operator (or backticks) can redirect C<STDERR>
180onto C<STDOUT>.
181
182=cut
183
184
# spent 0s within ExtUtils::MM_Any::can_redirect_error which was called 333 times, avg 0s/call: # 333 times (0s+0s) by ExtUtils::MM_Any::is_make_type at line 211, avg 0s/call
sub can_redirect_error {
1853330s my $self = shift;
1863330s9990s $self->os_flavor_is('Unix')
# spent 0s making 999 calls to ExtUtils::MM_Any::os_flavor_is, avg 0s/call
187 or ($self->os_flavor_is('Win32') and !$self->os_flavor_is('Win9x'))
188 or $self->os_flavor_is('OS/2')
189}
190
191
192=head3 is_make_type
193
194 my $is_dmake = $self->is_make_type('dmake');
195
196Returns true if C<<$self->make>> is the given type; possibilities are:
197
198 gmake GNU make
199 dmake
200 nmake
201 bsdmake BSD pmake-derived
202
203=cut
204
205
# spent 61.8s (0+61.8) within ExtUtils::MM_Any::is_make_type which was called 336 times, avg 184ms/call: # 292 times (0s+54.2s) by ExtUtils::MM_Win32::quote_literal at line 543 of ExtUtils/MM_Win32.pm, avg 186ms/call # 23 times (0s+4.27s) by ExtUtils::MM_Win32::cd at line 580 of ExtUtils/MM_Win32.pm, avg 186ms/call # 9 times (0s+1.11s) by ExtUtils::MM_Win32::init_DIRFILESEP at line 139 of ExtUtils/MM_Win32.pm, avg 123ms/call # 3 times (0s+562ms) by ExtUtils::MM_Win32::special_targets at line 277 of ExtUtils/MM_Win32.pm, avg 187ms/call # 3 times (0s+562ms) by ExtUtils::MM_Win32::constants at line 246 of ExtUtils/MM_Win32.pm, avg 187ms/call # 3 times (0s+546ms) by ExtUtils::MM_Win32::pasthru at line 470 of ExtUtils/MM_Win32.pm, avg 182ms/call # 3 times (0s+530ms) by ExtUtils::MM_Unix::test at line 3484 of ExtUtils/MM_Unix.pm, avg 177ms/call
sub is_make_type {
2063360s my($self, $type) = @_;
20733615.6ms67247.8ms (undef, undef, my $make_basename) = $self->splitpath($self->make);
# spent 31.2ms making 336 calls to File::Spec::Win32::splitpath, avg 93µs/call # spent 16.6ms making 336 calls to ExtUtils::MM_Any::make, avg 49µs/call
2083360s6720s return 1 if $make_basename =~ /\b$type\b/i; # executable's filename
# spent 0s making 336 calls to ExtUtils::MM_Any::CORE:match, avg 0s/call # spent 0s making 336 calls to ExtUtils::MM_Any::CORE:regcomp, avg 0s/call
2093330s3330s return 0 if $make_basename =~ /\b(dmake|nmake)\b/i; # Never fall through for dmake/nmake
# spent 0s making 333 calls to ExtUtils::MM_Any::CORE:match, avg 0s/call
210 # now have to run with "-v" and guess
2113330s3330s my $redirect = $self->can_redirect_error ? '2>&1' : '';
# spent 0s making 333 calls to ExtUtils::MM_Any::can_redirect_error, avg 0s/call
2123330s3330s my $make = $self->make || $self->{MAKE};
# spent 0s making 333 calls to ExtUtils::MM_Any::make, avg 0s/call
21333361.7s33361.7s my $minus_v = `"$make" -v $redirect`;
# spent 61.7s making 333 calls to ExtUtils::MM_Any::CORE:backtick, avg 185ms/call
2143330s return 1 if $type eq 'gmake' and $minus_v =~ /GNU make/i;
2153330s return 1 if $type eq 'bsdmake'
216 and $minus_v =~ /^usage: make \[-BeikNnqrstWwX\]/im;
2173330s 0; # it wasn't whatever you asked
218}
219
220
221=head3 can_dep_space
222
223 my $can_dep_space = $self->can_dep_space;
224
225Returns true if C<make> can handle (probably by quoting)
226dependencies that contain a space. Currently known true for GNU make,
227false for BSD pmake derivative.
228
229=cut
230
23110smy $cached_dep_space;
232sub can_dep_space {
233 my $self = shift;
234 return $cached_dep_space if defined $cached_dep_space;
235 return $cached_dep_space = 1 if $self->is_make_type('gmake');
236 return $cached_dep_space = 0 if $self->is_make_type('dmake'); # only on W32
237 return $cached_dep_space = 0 if $self->is_make_type('bsdmake');
238 return $cached_dep_space = 0; # assume no
239}
240
241
242=head3 quote_dep
243
244 $text = $mm->quote_dep($text);
245
246Method that protects Makefile single-value constants (mainly filenames),
247so that make will still treat them as single values even if they
248inconveniently have spaces in. If the make program being used cannot
249achieve such protection and the given text would need it, throws an
250exception.
251
252=cut
253
254
# spent 0s within ExtUtils::MM_Any::quote_dep which was called 13 times, avg 0s/call: # 13 times (0s+0s) by ExtUtils::MM_Win32::quote_dep at line 447 of ExtUtils/MM_Win32.pm, avg 0s/call
sub quote_dep {
255130s my ($self, $arg) = @_;
256130s130s die <<EOF if $arg =~ / / and not $self->can_dep_space;
# spent 0s making 13 calls to ExtUtils::MM_Any::CORE:match, avg 0s/call
257Tried to use make dependency with space for make that can't:
258 '$arg'
259EOF
260130s130s $arg =~ s/( )/\\$1/g; # how GNU make does it
# spent 0s making 13 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call
261130s return $arg;
262}
263
264
265=head3 split_command
266
267 my @cmds = $MM->split_command($cmd, @args);
268
269Most OS have a maximum command length they can execute at once. Large
270modules can easily generate commands well past that limit. Its
271necessary to split long commands up into a series of shorter commands.
272
273C<split_command> will return a series of @cmds each processing part of
274the args. Collectively they will process all the arguments. Each
275individual line in @cmds will not be longer than the
276$self->max_exec_len being careful to take into account macro expansion.
277
278$cmd should include any switches and repeated initial arguments.
279
280If no @args are given, no @cmds will be returned.
281
282Pairs of arguments will always be preserved in a single command, this
283is a heuristic for things like pm_to_blib and pod2man which work on
284pairs of arguments. This makes things like this safe:
285
286 $self->split_command($cmd, %pod2man);
287
288
289=cut
290
291
# spent 0s within ExtUtils::MM_Any::split_command which was called 21 times, avg 0s/call: # 6 times (0s+0s) by ExtUtils::MM_Any::manifypods_target at line 924, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::pm_to_blib at line 2915 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::clean at line 713, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::realclean at line 1573, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::realclean at line 1571, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::clean at line 714, avg 0s/call
sub split_command {
292210s my($self, $cmd, @args) = @_;
293
294210s my @cmds = ();
295210s return(@cmds) unless @args;
296
297 # If the command was given as a here-doc, there's probably a trailing
298 # newline.
299150s chomp $cmd;
300
301 # set aside 30% for macro expansion.
302150s150s my $len_left = int($self->max_exec_len * 0.70);
# spent 0s making 15 calls to ExtUtils::MM_Win32::max_exec_len, avg 0s/call
303150s150s $len_left -= length $self->_expand_macros($cmd);
# spent 0s making 15 calls to ExtUtils::MM_Any::_expand_macros, avg 0s/call
304
305150s do {
306150s my $arg_str = '';
307150s my @next_args;
308150s while( @next_args = splice(@args, 0, 2) ) {
309 # Two at a time to preserve pairs.
310700s my $next_arg_str = "\t ". join ' ', @next_args, "\n";
311
312700s if( !length $arg_str ) {
313 $arg_str .= $next_arg_str
314 }
315 elsif( length($arg_str) + length($next_arg_str) > $len_left ) {
316 unshift @args, @next_args;
317 last;
318 }
319 else {
320550s $arg_str .= $next_arg_str;
321 }
322 }
323150s chop $arg_str;
324
325150s150s push @cmds, $self->escape_newlines("$cmd \n$arg_str");
# spent 0s making 15 calls to ExtUtils::MM_Win32::escape_newlines, avg 0s/call
326 } while @args;
327
328150s return @cmds;
329}
330
331
332
# spent 0s within ExtUtils::MM_Any::_expand_macros which was called 15 times, avg 0s/call: # 15 times (0s+0s) by ExtUtils::MM_Any::split_command at line 303, avg 0s/call
sub _expand_macros {
333150s my($self, $cmd) = @_;
334
335150s450s $cmd =~ s{\$\((\w+)\)}{
# spent 0s making 15 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call # spent 0s making 30 calls to ExtUtils::MM_Any::CORE:substcont, avg 0s/call
336 defined $self->{$1} ? $self->{$1} : "\$($1)"
337 }e;
338150s return $cmd;
339}
340
341
342=head3 echo
343
344 my @commands = $MM->echo($text);
345 my @commands = $MM->echo($text, $file);
346 my @commands = $MM->echo($text, $file, \%opts);
347
348Generates a set of @commands which print the $text to a $file.
349
350If $file is not given, output goes to STDOUT.
351
352If $opts{append} is true the $file will be appended to rather than
353overwritten. Default is to overwrite.
354
355If $opts{allow_variables} is true, make variables of the form
356C<$(...)> will not be escaped. Other C<$> will. Default is to escape
357all C<$>.
358
359Example of use:
360
361 my $make = map "\t$_\n", $MM->echo($text, $file);
362
363=cut
364
365
# spent 39.7s (0+39.7) within ExtUtils::MM_Any::echo which was called 12 times, avg 3.31s/call: # 3 times (0s+23.1s) by ExtUtils::MM_Any::metafile_target at line 986, avg 7.69s/call # 3 times (0s+12.2s) by ExtUtils::MM_Any::metafile_target at line 983, avg 4.06s/call # 3 times (0s+3.88s) by ExtUtils::MM_Unix::ppd at line 3062 of ExtUtils/MM_Unix.pm, avg 1.29s/call # 3 times (0s+562ms) by ExtUtils::MM_Unix::ppd at line 2985 of ExtUtils/MM_Unix.pm, avg 187ms/call
sub echo {
366120s my($self, $text, $file, $opts) = @_;
367
368 # Compatibility with old options
369120s if( !ref $opts ) {
37060s my $append = $opts;
37160s $opts = { append => $append || 0 };
372 }
373120s $opts->{allow_variables} = 0 unless defined $opts->{allow_variables};
374
375120s my $ql_opts = { allow_variables => $opts->{allow_variables} };
3762250s21339.7s my @cmds = map { '$(NOECHO) $(ECHO) '.$self->quote_literal($_, $ql_opts) }
# spent 39.7s making 213 calls to ExtUtils::MM_Win32::quote_literal, avg 186ms/call
377 split /\n/, $text;
378120s if( $file ) {
379120s my $redirect = $opts->{append} ? '>>' : '>';
380120s $cmds[0] .= " $redirect $file";
381120s $_ .= " >> $file" foreach @cmds[1..$#cmds];
382 }
383
384120s return @cmds;
385}
386
387
388=head3 wraplist
389
390 my $args = $mm->wraplist(@list);
391
392Takes an array of items and turns them into a well-formatted list of
393arguments. In most cases this is simply something like:
394
395 FOO \
396 BAR \
397 BAZ
398
399=cut
400
401
# spent 0s within ExtUtils::MM_Any::wraplist which was called 24 times, avg 0s/call: # 18 times (0s+0s) by ExtUtils::MM_Unix::constants at line 461 of ExtUtils/MM_Unix.pm, avg 0s/call # 6 times (0s+0s) by ExtUtils::MM_Unix::constants at line 496 of ExtUtils/MM_Unix.pm, avg 0s/call
sub wraplist {
402240s my $self = shift;
403240s return join " \\\n\t", @_;
404}
405
406
407=head3 maketext_filter
408
409 my $filter_make_text = $mm->maketext_filter($make_text);
410
411The text of the Makefile is run through this method before writing to
412disk. It allows systems a chance to make portability fixes to the
413Makefile.
414
415By default it does nothing.
416
417This method is protected and not intended to be called outside of
418MakeMaker.
419
420=cut
421
4221540s
# spent 0s within ExtUtils::MM_Any::maketext_filter which was called 154 times, avg 0s/call: # 154 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub maketext_filter { return $_[1] }
423
424
425=head3 cd I<Abstract>
426
427 my $subdir_cmd = $MM->cd($subdir, @cmds);
428
429This will generate a make fragment which runs the @cmds in the given
430$dir. The rough equivalent to this, except cross platform.
431
432 cd $subdir && $cmd
433
434Currently $dir can only go down one level. "foo" is fine. "foo/bar" is
435not. "../foo" is right out.
436
437The resulting $subdir_cmd has no leading tab nor trailing newline. This
438makes it easier to embed in a make string. For example.
439
440 my $make = sprintf <<'CODE', $subdir_cmd;
441 foo :
442 $(ECHO) what
443 %s
444 $(ECHO) mouche
445 CODE
446
447
448=head3 oneliner I<Abstract>
449
450 my $oneliner = $MM->oneliner($perl_code);
451 my $oneliner = $MM->oneliner($perl_code, \@switches);
452
453This will generate a perl one-liner safe for the particular platform
454you're on based on the given $perl_code and @switches (a -e is
455assumed) suitable for using in a make target. It will use the proper
456shell quoting and escapes.
457
458$(PERLRUN) will be used as perl.
459
460Any newlines in $perl_code will be escaped. Leading and trailing
461newlines will be stripped. Makes this idiom much easier:
462
463 my $code = $MM->oneliner(<<'CODE', [...switches...]);
464some code here
465another line here
466CODE
467
468Usage might be something like:
469
470 # an echo emulation
471 $oneliner = $MM->oneliner('print "Foo\n"');
472 $make = '$oneliner > somefile';
473
474All dollar signs must be doubled in the $perl_code if you expect them
475to be interpreted normally, otherwise it will be considered a make
476macro. Also remember to quote make macros else it might be used as a
477bareword. For example:
478
479 # Assign the value of the $(VERSION_FROM) make macro to $vf.
480 $oneliner = $MM->oneliner('$$vf = "$(VERSION_FROM)"');
481
482Its currently very simple and may be expanded sometime in the figure
483to include more flexible code and switches.
484
485
486=head3 quote_literal I<Abstract>
487
488 my $safe_text = $MM->quote_literal($text);
489 my $safe_text = $MM->quote_literal($text, \%options);
490
491This will quote $text so it is interpreted literally in the shell.
492
493For example, on Unix this would escape any single-quotes in $text and
494put single-quotes around the whole thing.
495
496If $options{allow_variables} is true it will leave C<'$(FOO)'> make
497variables untouched. If false they will be escaped like any other
498C<$>. Defaults to true.
499
500=head3 escape_dollarsigns
501
502 my $escaped_text = $MM->escape_dollarsigns($text);
503
504Escapes stray C<$> so they are not interpreted as make variables.
505
506It lets by C<$(...)>.
507
508=cut
509
510
# spent 0s within ExtUtils::MM_Any::escape_dollarsigns which was called 82 times, avg 0s/call: # 82 times (0s+0s) by ExtUtils::MM_Win32::quote_literal at line 548 of ExtUtils/MM_Win32.pm, avg 0s/call
sub escape_dollarsigns {
511820s my($self, $text) = @_;
512
513 # Escape dollar signs which are not starting a variable
514820s820s $text =~ s{\$ (?!\() }{\$\$}gx;
# spent 0s making 82 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call
515
516820s return $text;
517}
518
519
520=head3 escape_all_dollarsigns
521
522 my $escaped_text = $MM->escape_all_dollarsigns($text);
523
524Escapes all C<$> so they are not interpreted as make variables.
525
526=cut
527
528
# spent 0s within ExtUtils::MM_Any::escape_all_dollarsigns which was called 210 times, avg 0s/call: # 210 times (0s+0s) by ExtUtils::MM_Win32::quote_literal at line 548 of ExtUtils/MM_Win32.pm, avg 0s/call
sub escape_all_dollarsigns {
5292100s my($self, $text) = @_;
530
531 # Escape dollar signs
5322100s2100s $text =~ s{\$}{\$\$}gx;
# spent 0s making 210 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call
533
5342100s return $text;
535}
536
537
538=head3 escape_newlines I<Abstract>
539
540 my $escaped_text = $MM->escape_newlines($text);
541
542Shell escapes newlines in $text.
543
544
545=head3 max_exec_len I<Abstract>
546
547 my $max_exec_len = $MM->max_exec_len;
548
549Calculates the maximum command size the OS can exec. Effectively,
550this is the max size of a shell command line.
551
552=for _private
553$self->{_MAX_EXEC_LEN} is set by this method, but only for testing purposes.
554
555
556=head3 make
557
558 my $make = $MM->make;
559
560Returns the make variant we're generating the Makefile for. This attempts
561to do some normalization on the information from %Config or the user.
562
563=cut
564
565
# spent 16.6ms within ExtUtils::MM_Any::make which was called 672 times, avg 25µs/call: # 336 times (16.6ms+0s) by ExtUtils::MM_Any::is_make_type at line 207, avg 49µs/call # 333 times (0s+0s) by ExtUtils::MM_Any::is_make_type at line 212, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::flush at line 1159 of ExtUtils/MakeMaker.pm, avg 0s/call
sub make {
5666720s my $self = shift;
567
5686720s my $make = lc $self->{MAKE};
569
570 # Truncate anything like foomake6 to just foomake.
5716721.00ms6720s $make =~ s/^(\w+make).*/$1/;
# spent 0s making 672 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call
572
573 # Turn gnumake into gmake.
5746720s6720s $make =~ s/^gnu/g/;
# spent 0s making 672 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call
575
5766720s return $make;
577}
578
579
580=head2 Targets
581
582These are methods which produce make targets.
583
584
585=head3 all_target
586
587Generate the default target 'all'.
588
589=cut
590
591
# spent 0s within ExtUtils::MM_Any::all_target which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::top_targets at line 3669 of ExtUtils/MM_Unix.pm, avg 0s/call
sub all_target {
59230s my $self = shift;
593
59430s return <<'MAKE_EXT';
595all :: pure_all
596 $(NOECHO) $(NOOP)
597MAKE_EXT
598
599}
600
601
602=head3 blibdirs_target
603
604 my $make_frag = $mm->blibdirs_target;
605
606Creates the blibdirs target which creates all the directories we use
607in blib/.
608
609The blibdirs.ts target is deprecated. Depend on blibdirs instead.
610
611
612=cut
613
614
# spent 0s within ExtUtils::MM_Any::blibdirs_target which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub blibdirs_target {
61530s my $self = shift;
616
61730s my @dirs = map { uc "\$(INST_$_)" } qw(libdir archlib
618 autodir archautodir
619 bin script
620 man1dir man3dir
621 );
622
62330s my @exists = map { $_.'$(DFSEP).exists' } @dirs;
624
62530s my $make = sprintf <<'MAKE', join(' ', @exists);
626blibdirs : %s
627 $(NOECHO) $(NOOP)
628
629# Backwards compat with 6.18 through 6.25
630blibdirs.ts : blibdirs
631 $(NOECHO) $(NOOP)
632
633MAKE
634
63530s30s $make .= $self->dir_target(@dirs);
# spent 0s making 3 calls to ExtUtils::MM_Any::dir_target, avg 0s/call
636
63730s return $make;
638}
639
640
641=head3 clean (o)
642
643Defines the clean target.
644
645=cut
646
647
# spent 0s within ExtUtils::MM_Any::clean which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub clean {
648# --- Cleanup and Distribution Sections ---
649
65030s my($self, %attribs) = @_;
65130s my @m;
65230s push(@m, '
653# Delete temporary files but do not touch installed files. We don\'t delete
654# the Makefile here so a later make realclean still has a makefile to use.
655
656clean :: clean_subdirs
657');
658
65930s30s my @files = sort values %{$self->{XS}}; # .c files from *.xs files
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:sort, avg 0s/call
66030s my @dirs = qw(blib);
661
662 # Normally these are all under blib but they might have been
663 # redefined.
664 # XXX normally this would be a good idea, but the Perl core sets
665 # INST_LIB = ../../lib rather than actually installing the files.
666 # So a "make clean" in an ext/ directory would blow away lib.
667 # Until the core is adjusted let's leave this out.
668# push @dirs, qw($(INST_ARCHLIB) $(INST_LIB)
669# $(INST_BIN) $(INST_SCRIPT)
670# $(INST_MAN1DIR) $(INST_MAN3DIR)
671# $(INST_LIBDIR) $(INST_ARCHLIBDIR) $(INST_AUTODIR)
672# $(INST_STATIC) $(INST_DYNAMIC)
673# );
674
675
67630s if( $attribs{FILES} ) {
677 # Use @dirs because we don't know what's in here.
678 push @dirs, ref $attribs{FILES} ?
67910s @{$attribs{FILES}} :
680 split /\s+/, $attribs{FILES} ;
681 }
682
68330s push(@files, qw[$(MAKE_APERL_FILE)
684 MYMETA.json MYMETA.yml perlmain.c tmon.out mon.out so_locations
685 blibdirs.ts pm_to_blib pm_to_blib.ts
686 *$(OBJ_EXT) *$(LIB_EXT) perl.exe perl perl$(EXE_EXT)
687 $(BOOTSTRAP) $(BASEEXT).bso
688 $(BASEEXT).def lib$(BASEEXT).def
689 $(BASEEXT).exp $(BASEEXT).x
690 ]);
691
69230s30s push(@files, $self->catfile('$(INST_ARCHAUTODIR)','extralibs.all'));
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call
69330s30s push(@files, $self->catfile('$(INST_ARCHAUTODIR)','extralibs.ld'));
# spent 0s making 3 calls to ExtUtils::MM_Any::catfile, avg 0s/call
694
695 # core files
69630s if ($^O eq 'vos') {
697 push(@files, qw[perl*.kp]);
698 }
699 else {
70030s push(@files, qw[core core.*perl.*.? *perl.core]);
701 }
702
70330s push(@files, map { "core." . "[0-9]"x$_ } (1..5));
704
705 # OS specific things to clean up. Use @dirs since we don't know
706 # what might be in here.
70730s30s push @dirs, $self->extra_clean_files;
# spent 0s making 3 calls to ExtUtils::MM_Win32::extra_clean_files, avg 0s/call
708
709 # Occasionally files are repeated several times from different sources
71090s30s { my(%f) = map { ($_ => 1) } @files; @files = sort keys %f; }
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:sort, avg 0s/call
71190s30s { my(%d) = map { ($_ => 1) } @dirs; @dirs = sort keys %d; }
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:sort, avg 0s/call
712
71330s30s push @m, map "\t$_\n", $self->split_command('- $(RM_F)', @files);
# spent 0s making 3 calls to ExtUtils::MM_Any::split_command, avg 0s/call
71430s30s push @m, map "\t$_\n", $self->split_command('- $(RM_RF)', @dirs);
# spent 0s making 3 calls to ExtUtils::MM_Any::split_command, avg 0s/call
715
716 # Leave Makefile.old around for realclean
71730s push @m, <<'MAKE';
718 $(NOECHO) $(RM_F) $(MAKEFILE_OLD)
719 - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
720MAKE
721
72230s push(@m, "\t$attribs{POSTOP}\n") if $attribs{POSTOP};
723
72430s join("", @m);
725}
726
727
728=head3 clean_subdirs_target
729
730 my $make_frag = $MM->clean_subdirs_target;
731
732Returns the clean_subdirs target. This is used by the clean target to
733call clean on any subdirectories which contain Makefiles.
734
735=cut
736
737
# spent 359ms (0s+359) within ExtUtils::MM_Any::clean_subdirs_target which was called 3 times, avg 120ms/call: # 3 times (0s+359ms) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 120ms/call
sub clean_subdirs_target {
73830s my($self) = shift;
739
740 # No subdirectories, no cleaning.
74130s return <<'NOOP_FRAG' unless @{$self->{DIR}};
742clean_subdirs :
743 $(NOECHO) $(NOOP)
744NOOP_FRAG
745
746
74710s my $clean = "clean_subdirs :\n";
748
74910s for my $dir (@{$self->{DIR}}) {
75020s2359ms my $subclean = $self->oneliner(sprintf <<'CODE', $dir);
# spent 359ms making 2 calls to ExtUtils::MM_Win32::oneliner, avg 179ms/call
751exit 0 unless chdir '%s'; system '$(MAKE) clean' if -f '$(FIRST_MAKEFILE)';
752CODE
753
75420s $clean .= "\t$subclean\n";
755 }
756
75710s return $clean;
758}
759
760
761=head3 dir_target
762
763 my $make_frag = $mm->dir_target(@directories);
764
765Generates targets to create the specified directories and set its
766permission to PERM_DIR.
767
768Because depending on a directory to just ensure it exists doesn't work
769too well (the modified time changes too often) dir_target() creates a
770.exists file in the created directory. It is this you should depend on.
771For portability purposes you should use the $(DIRFILESEP) macro rather
772than a '/' to separate the directory from the file.
773
774 yourdirectory$(DIRFILESEP).exists
775
776=cut
777
778
# spent 0s within ExtUtils::MM_Any::dir_target which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::blibdirs_target at line 635, avg 0s/call
sub dir_target {
77930s my($self, @dirs) = @_;
780
78130s my $make = '';
78230s foreach my $dir (@dirs) {
783240s $make .= sprintf <<'MAKE', ($dir) x 4;
784%s$(DFSEP).exists :: Makefile.PL
785 $(NOECHO) $(MKPATH) %s
786 $(NOECHO) $(CHMOD) $(PERM_DIR) %s
787 $(NOECHO) $(TOUCH) %s$(DFSEP).exists
788
789MAKE
790
791 }
792
79330s return $make;
794}
795
796
797=head3 distdir
798
799Defines the scratch directory target that will hold the distribution
800before tar-ing (or shar-ing).
801
802=cut
803
804# For backwards compatibility.
80510s*dist_dir = *distdir;
806
807
# spent 0s within ExtUtils::MM_Any::distdir which was called: # once (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm
sub distdir {
80810s my($self) = shift;
809
81010s my $meta_target = $self->{NO_META} ? '' : 'distmeta';
81110s my $sign_target = !$self->{SIGN} ? '' : 'distsignature';
812
81310s return sprintf <<'MAKE_FRAG', $meta_target, $sign_target;
814create_distdir :
815 $(RM_RF) $(DISTVNAME)
816 $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
817 -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
818
819distdir : create_distdir %s %s
820 $(NOECHO) $(NOOP)
821
822MAKE_FRAG
823
824}
825
826
827=head3 dist_test
828
829Defines a target that produces the distribution in the
830scratch directory, and runs 'perl Makefile.PL; make ;make test' in that
831subdirectory.
832
833=cut
834
835
# spent 187ms (0s+187) within ExtUtils::MM_Any::dist_test which was called: # once (0s+187ms) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm
sub dist_test {
83610s my($self) = shift;
837
83810s my $mpl_args = join " ", map qq["$_"], @ARGV;
839
84010s1187ms my $test = $self->cd('$(DISTVNAME)',
# spent 187ms making 1 call to ExtUtils::MM_Win32::cd
841 '$(ABSPERLRUN) Makefile.PL '.$mpl_args,
842 '$(MAKE) $(PASTHRU)',
843 '$(MAKE) test $(PASTHRU)'
844 );
845
84610s return sprintf <<'MAKE_FRAG', $test;
847disttest : distdir
848 %s
849
850MAKE_FRAG
851
852
853}
854
855
856=head3 dynamic (o)
857
858Defines the dynamic target.
859
860=cut
861
862
# spent 0s within ExtUtils::MM_Any::dynamic which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub dynamic {
863# --- Dynamic Loading Sections ---
864
86530s my($self) = shift;
86630s '
867dynamic :: $(FIRST_MAKEFILE) $(BOOTSTRAP) $(INST_DYNAMIC)
868 $(NOECHO) $(NOOP)
869';
870}
871
872
873=head3 makemakerdflt_target
874
875 my $make_frag = $mm->makemakerdflt_target
876
877Returns a make fragment with the makemakerdeflt_target specified.
878This target is the first target in the Makefile, is the default target
879and simply points off to 'all' just in case any make variant gets
880confused or something gets snuck in before the real 'all' target.
881
882=cut
883
884
# spent 0s within ExtUtils::MM_Any::makemakerdflt_target which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub makemakerdflt_target {
88530s return <<'MAKE_FRAG';
886makemakerdflt : all
887 $(NOECHO) $(NOOP)
888MAKE_FRAG
889
890}
891
892
893=head3 manifypods_target
894
895 my $manifypods_target = $self->manifypods_target;
896
897Generates the manifypods target. This target generates man pages from
898all POD files in MAN1PODS and MAN3PODS.
899
900=cut
901
902
# spent 0s within ExtUtils::MM_Any::manifypods_target which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::manifypods at line 2451, avg 0s/call
sub manifypods_target {
90330s my($self) = shift;
904
90530s my $man1pods = '';
90630s my $man3pods = '';
90730s my $dependencies = '';
908
909 # populate manXpods & dependencies:
91030s60s foreach my $name (sort keys %{$self->{MAN1PODS}}, sort keys %{$self->{MAN3PODS}}) {
# spent 0s making 6 calls to ExtUtils::MM_Any::CORE:sort, avg 0s/call
911 $dependencies .= " \\\n\t$name";
912 }
913
91430s my $manify = <<END;
915manifypods : pure_all $dependencies
916END
917
91830s my @man_cmds;
91930s foreach my $section (qw(1 3)) {
92060s my $pods = $self->{"MAN${section}PODS"};
92160s my $p2m = sprintf <<CMD, $] > 5.008 ? " -u" : "";
922 \$(NOECHO) \$(POD2MAN) --section=$section --perm_rw=\$(PERM_RW)%s
923CMD
92460s120s push @man_cmds, $self->split_command($p2m, map {($_,$pods->{$_})} sort keys %$pods);
# spent 0s making 6 calls to ExtUtils::MM_Any::CORE:sort, avg 0s/call # spent 0s making 6 calls to ExtUtils::MM_Any::split_command, avg 0s/call
925 }
926
92730s $manify .= "\t\$(NOECHO) \$(NOOP)\n" unless @man_cmds;
92830s $manify .= join '', map { "$_\n" } @man_cmds;
929
93030s return $manify;
931}
932
933
# spent 31.2ms (0s+31.2) within ExtUtils::MM_Any::_has_cpan_meta which was called 15 times, avg 2.08ms/call: # 6 times (0s+0s) by ExtUtils::MM_Any::_fix_metadata_before_conversion at line 1024, avg 0s/call # 3 times (0s+31.2ms) by ExtUtils::MM_Any::metafile_target at line 955, avg 10.4ms/call # 3 times (0s+0s) by ExtUtils::MM_Any::write_mymeta at line 1522, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::_mymeta_from_meta at line 1484, avg 0s/call
sub _has_cpan_meta {
934150s return eval {
935150s require CPAN::Meta;
936150s150s CPAN::Meta->VERSION(2.112150);
# spent 0s making 15 calls to version::vxs::_VERSION, avg 0s/call
937150s 1;
938 };
939}
940
941=head3 metafile_target
942
943 my $target = $mm->metafile_target;
944
945Generate the metafile target.
946
947Writes the file META.yml (YAML encoded meta-data) and META.json
948(JSON encoded meta-data) about the module in the distdir.
949The format follows Module::Build's as closely as possible.
950
951=cut
952
953
# spent 35.4s (0+35.4) within ExtUtils::MM_Any::metafile_target which was called 3 times, avg 11.8s/call: # 3 times (0s+35.4s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 11.8s/call
sub metafile_target {
95430s my $self = shift;
95530s331.2ms return <<'MAKE_FRAG' if $self->{NO_META} or ! _has_cpan_meta();
# spent 31.2ms making 3 calls to ExtUtils::MM_Any::_has_cpan_meta, avg 10.4ms/call
956metafile :
957 $(NOECHO) $(NOOP)
958MAKE_FRAG
959
96030s30s my %metadata = $self->metafile_data(
# spent 0s making 3 calls to ExtUtils::MM_Any::metafile_data, avg 0s/call
961 $self->{META_ADD} || {},
962 $self->{META_MERGE} || {},
963 );
964
96530s30s _fix_metadata_before_conversion( \%metadata );
# spent 0s making 3 calls to ExtUtils::MM_Any::_fix_metadata_before_conversion, avg 0s/call
966
967 # paper over validation issues, but still complain, necessary because
968 # there's no guarantee that the above will fix ALL errors
96960s346.8ms my $meta = eval { CPAN::Meta->create( \%metadata, { lazy_validation => 1 } ) };
# spent 46.8ms making 3 calls to CPAN::Meta::create, avg 15.6ms/call
97030s warn $@ if $@ and
971 $@ !~ /encountered CODE.*, but JSON can only represent references to arrays or hashes/;
972
973 # use the original metadata straight if the conversion failed
974 # or if it can't be stringified.
97530s if( !$meta ||
97630s331.2ms !eval { $meta->as_string( { version => "1.4" } ) } ||
# spent 31.2ms making 3 calls to CPAN::Meta::as_string, avg 10.4ms/call
97730s30s !eval { $meta->as_string }
# spent 0s making 3 calls to CPAN::Meta::as_string, avg 0s/call
978 )
979 {
980 $meta = bless \%metadata, 'CPAN::Meta';
981 }
982
98330s612.2s my @write_metayml = $self->echo(
# spent 12.2s making 3 calls to ExtUtils::MM_Any::echo, avg 4.06s/call # spent 31.2ms making 3 calls to CPAN::Meta::as_string, avg 10.4ms/call
984 $meta->as_string({version => "1.4"}), 'META_new.yml'
985 );
98630s623.1s my @write_metajson = $self->echo(
# spent 23.1s making 3 calls to ExtUtils::MM_Any::echo, avg 7.69s/call # spent 15.6ms making 3 calls to CPAN::Meta::as_string, avg 5.20ms/call
987 $meta->as_string(), 'META_new.json'
988 );
989
99030s my $metayml = join("\n\t", @write_metayml);
99130s my $metajson = join("\n\t", @write_metajson);
99230s return sprintf <<'MAKE_FRAG', $metayml, $metajson;
993metafile : create_distdir
994 $(NOECHO) $(ECHO) Generating META.yml
995 %s
996 -$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
997 $(NOECHO) $(ECHO) Generating META.json
998 %s
999 -$(NOECHO) $(MV) META_new.json $(DISTVNAME)/META.json
1000MAKE_FRAG
1001
1002}
1003
1004=begin private
1005
1006=head3 _fix_metadata_before_conversion
1007
1008 _fix_metadata_before_conversion( \%metadata );
1009
1010Fixes errors in the metadata before it's handed off to CPAN::Meta for
1011conversion. This hopefully results in something that can be used further
1012on, no guarantee is made though.
1013
1014=end private
1015
1016=cut
1017
1018
# spent 0s within ExtUtils::MM_Any::_fix_metadata_before_conversion which was called 6 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::metafile_target at line 965, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::write_mymeta at line 1524, avg 0s/call
sub _fix_metadata_before_conversion {
101960s my ( $metadata ) = @_;
1020
1021 # we should never be called unless this already passed but
1022 # prefer to be defensive in case somebody else calls this
1023
102460s60s return unless _has_cpan_meta;
# spent 0s making 6 calls to ExtUtils::MM_Any::_has_cpan_meta, avg 0s/call
1025
102660s120s my $bad_version = $metadata->{version} &&
# spent 0s making 6 calls to CPAN::Meta::Validator::new, avg 0s/call # spent 0s making 6 calls to CPAN::Meta::Validator::version, avg 0s/call
1027 !CPAN::Meta::Validator->new->version( 'version', $metadata->{version} );
1028
1029 # just delete all invalid versions
103060s if( $bad_version ) {
1031 warn "Can't parse version '$metadata->{version}'\n";
1032 $metadata->{version} = '';
1033 }
1034
103560s60s my $validator = CPAN::Meta::Validator->new( $metadata );
# spent 0s making 6 calls to CPAN::Meta::Validator::new, avg 0s/call
103660s60s return if $validator->is_valid;
# spent 0s making 6 calls to CPAN::Meta::Validator::is_valid, avg 0s/call
1037
1038 # fix non-camelcase custom resource keys (only other trick we know)
103910s10s for my $error ( $validator->errors ) {
# spent 0s making 1 call to CPAN::Meta::Validator::errors
104030s30s my ( $key ) = ( $error =~ /Custom resource '(.*)' must be in CamelCase./ );
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:match, avg 0s/call
104130s next if !$key;
1042
1043 # first try to remove all non-alphabetic chars
1044 ( my $new_key = $key ) =~ s/[^_a-zA-Z]//g;
1045
1046 # if that doesn't work, uppercase first one
1047 $new_key = ucfirst $new_key if !$validator->custom_1( $new_key );
1048
1049 # copy to new key if that worked
1050 $metadata->{resources}{$new_key} = $metadata->{resources}{$key}
1051 if $validator->custom_1( $new_key );
1052
1053 # and delete old one in any case
1054 delete $metadata->{resources}{$key};
1055 }
1056
105710s return;
1058}
1059
1060
1061=begin private
1062
1063=head3 _sort_pairs
1064
1065 my @pairs = _sort_pairs($sort_sub, \%hash);
1066
1067Sorts the pairs of a hash based on keys ordered according
1068to C<$sort_sub>.
1069
1070=end private
1071
1072=cut
1073
1074sub _sort_pairs {
1075 my $sort = shift;
1076 my $pairs = shift;
1077 return map { $_ => $pairs->{$_} }
1078 sort $sort
1079 keys %$pairs;
1080}
1081
1082
1083# Taken from Module::Build::Base
1084
# spent 0s within ExtUtils::MM_Any::_hash_merge which was called 3 times, avg 0s/call: # 2 times (0s+0s) by ExtUtils::MM_Any::metafile_data at line 1149, avg 0s/call # once (0s+0s) by ExtUtils::MM_Any::_hash_merge at line 1089
sub _hash_merge {
108530s my ($self, $h, $k, $v) = @_;
108630s if (ref $h->{$k} eq 'ARRAY') {
1087 push @{$h->{$k}}, ref $v ? @$v : $v;
1088 } elsif (ref $h->{$k} eq 'HASH') {
108910s10s $self->_hash_merge($h->{$k}, $_, $v->{$_}) foreach keys %$v;
# spent 0s making 1 call to ExtUtils::MM_Any::_hash_merge, recursion: max depth 1, sum of overlapping time 0s
1090 } else {
109120s $h->{$k} = $v;
1092 }
1093}
1094
1095
1096=head3 metafile_data
1097
1098 my @metadata_pairs = $mm->metafile_data(\%meta_add, \%meta_merge);
1099
1100Returns the data which MakeMaker turns into the META.yml file
1101and the META.json file.
1102
1103Values of %meta_add will overwrite any existing metadata in those
1104keys. %meta_merge will be merged with them.
1105
1106=cut
1107
1108
# spent 0s within ExtUtils::MM_Any::metafile_data which was called 5 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::metafile_target at line 960, avg 0s/call # 2 times (0s+0s) by ExtUtils::MM_Any::mymeta at line 1458, avg 0s/call
sub metafile_data {
110950s my $self = shift;
111050s my($meta_add, $meta_merge) = @_;
1111
111250s50s my %meta = (
# spent 0s making 5 calls to ExtUtils::MM_Any::_normalize_version, avg 0s/call
1113 # required
1114 name => $self->{DISTNAME},
1115 version => _normalize_version($self->{VERSION}),
1116 abstract => $self->{ABSTRACT} || 'unknown',
1117 license => $self->{LICENSE} || 'unknown',
1118 dynamic_config => 1,
1119
1120 # optional
1121 distribution_type => $self->{PM} ? 'module' : 'script',
1122
1123 no_index => {
1124 directory => [qw(t inc)]
1125 },
1126
1127 generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
1128 'meta-spec' => {
1129 url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
1130 version => 1.4
1131 },
1132 );
1133
1134 # The author key is required and it takes a list.
113550s $meta{author} = defined $self->{AUTHOR} ? $self->{AUTHOR} : [];
1136
1137 {
1138100s50s my $vers = _metaspec_version( $meta_add, $meta_merge );
# spent 0s making 5 calls to ExtUtils::MM_Any::_metaspec_version, avg 0s/call
113950s50s my $method = $vers =~ m!^2!
# spent 0s making 5 calls to ExtUtils::MM_Any::CORE:match, avg 0s/call
1140 ? '_add_requirements_to_meta_v2'
1141 : '_add_requirements_to_meta_v1_4';
114250s50s %meta = $self->$method( %meta );
# spent 0s making 4 calls to ExtUtils::MM_Any::_add_requirements_to_meta_v1_4, avg 0s/call # spent 0s making 1 call to ExtUtils::MM_Any::_add_requirements_to_meta_v2
1143 }
1144
114550s while( my($key, $val) = each %$meta_add ) {
1146 $meta{$key} = $val;
1147 }
1148
114950s20s while( my($key, $val) = each %$meta_merge ) {
# spent 0s making 2 calls to ExtUtils::MM_Any::_hash_merge, avg 0s/call
1150 $self->_hash_merge(\%meta, $key, $val);
1151 }
1152
115350s return %meta;
1154}
1155
1156
1157=begin private
1158
1159=cut
1160
1161
# spent 0s within ExtUtils::MM_Any::_metaspec_version which was called 5 times, avg 0s/call: # 5 times (0s+0s) by ExtUtils::MM_Any::metafile_data at line 1138, avg 0s/call
sub _metaspec_version {
116250s my ( $meta_add, $meta_merge ) = @_;
116350s return $meta_add->{'meta-spec'}->{version}
1164 if defined $meta_add->{'meta-spec'}
1165 and defined $meta_add->{'meta-spec'}->{version};
116650s return $meta_merge->{'meta-spec'}->{version}
1167 if defined $meta_merge->{'meta-spec'}
1168 and defined $meta_merge->{'meta-spec'}->{version};
116940s return '1.4';
1170}
1171
1172
# spent 0s within ExtUtils::MM_Any::_add_requirements_to_meta_v1_4 which was called 6 times, avg 0s/call: # 4 times (0s+0s) by ExtUtils::MM_Any::metafile_data at line 1142, avg 0s/call # 2 times (0s+0s) by ExtUtils::MM_Any::mymeta at line 1472, avg 0s/call
sub _add_requirements_to_meta_v1_4 {
117360s my ( $self, %meta ) = @_;
1174
1175 # Check the original args so we can tell between the user setting it
1176 # to an empty hash and it just being initialized.
117760s if( $self->{ARGS}{CONFIGURE_REQUIRES} ) {
1178 $meta{configure_requires} = $self->{CONFIGURE_REQUIRES};
1179 } else {
118060s $meta{configure_requires} = {
1181 'ExtUtils::MakeMaker' => 0,
1182 };
1183 }
1184
118560s if( $self->{ARGS}{BUILD_REQUIRES} ) {
1186 $meta{build_requires} = $self->{BUILD_REQUIRES};
1187 } else {
118860s $meta{build_requires} = {
1189 'ExtUtils::MakeMaker' => 0,
1190 };
1191 }
1192
119360s if( $self->{ARGS}{TEST_REQUIRES} ) {
1194 $meta{build_requires} = {
1195 %{ $meta{build_requires} },
1196 %{ $self->{TEST_REQUIRES} },
1197 };
1198 }
1199
120060s $meta{requires} = $self->{PREREQ_PM}
1201 if defined $self->{PREREQ_PM};
120260s $meta{requires}{perl} = _normalize_version($self->{MIN_PERL_VERSION})
1203 if $self->{MIN_PERL_VERSION};
1204
120560s return %meta;
1206}
1207
1208
# spent 0s within ExtUtils::MM_Any::_add_requirements_to_meta_v2 which was called 2 times, avg 0s/call: # once (0s+0s) by ExtUtils::MM_Any::metafile_data at line 1142 # once (0s+0s) by ExtUtils::MM_Any::mymeta at line 1472
sub _add_requirements_to_meta_v2 {
120920s my ( $self, %meta ) = @_;
1210
1211 # Check the original args so we can tell between the user setting it
1212 # to an empty hash and it just being initialized.
121320s if( $self->{ARGS}{CONFIGURE_REQUIRES} ) {
1214 $meta{prereqs}{configure}{requires} = $self->{CONFIGURE_REQUIRES};
1215 } else {
121620s $meta{prereqs}{configure}{requires} = {
1217 'ExtUtils::MakeMaker' => 0,
1218 };
1219 }
1220
122120s if( $self->{ARGS}{BUILD_REQUIRES} ) {
1222 $meta{prereqs}{build}{requires} = $self->{BUILD_REQUIRES};
1223 } else {
122420s $meta{prereqs}{build}{requires} = {
1225 'ExtUtils::MakeMaker' => 0,
1226 };
1227 }
1228
122920s if( $self->{ARGS}{TEST_REQUIRES} ) {
1230 $meta{prereqs}{test}{requires} = $self->{TEST_REQUIRES};
1231 }
1232
123320s $meta{prereqs}{runtime}{requires} = $self->{PREREQ_PM}
1234 if $self->{ARGS}{PREREQ_PM};
123520s $meta{prereqs}{runtime}{requires}{perl} = _normalize_version($self->{MIN_PERL_VERSION})
1236 if $self->{MIN_PERL_VERSION};
1237
123820s return %meta;
1239}
1240
1241# Adapted from Module::Build::Base
1242
# spent 0s within ExtUtils::MM_Any::_normalize_version which was called 5 times, avg 0s/call: # 5 times (0s+0s) by ExtUtils::MM_Any::metafile_data at line 1112, avg 0s/call
sub _normalize_version {
124350s my ($version) = @_;
124450s $version = 0 unless defined $version;
1245
124650s50s if ( ref $version eq 'version' ) { # version objects
# spent 0s making 5 calls to ExtUtils::MM_Any::CORE:match, avg 0s/call
1247 $version = $version->is_qv ? $version->normal : $version->stringify;
1248 }
1249 elsif ( $version =~ /^[^v][^.]*\.[^.]+\./ ) { # no leading v, multiple dots
1250 # normalize string tuples without "v": "1.2.3" -> "v1.2.3"
1251 $version = "v$version";
1252 }
1253 else {
1254 # leave alone
1255 }
125650s return $version;
1257}
1258
1259=head3 _dump_hash
1260
1261 $yaml = _dump_hash(\%options, %hash);
1262
1263Implements a fake YAML dumper for a hash given
1264as a list of pairs. No quoting/escaping is done. Keys
1265are supposed to be strings. Values are undef, strings,
1266hash refs or array refs of strings.
1267
1268Supported options are:
1269
1270 delta => STR - indentation delta
1271 use_header => BOOL - whether to include a YAML header
1272 indent => STR - a string of spaces
1273 default: ''
1274
1275 max_key_length => INT - maximum key length used to align
1276 keys and values of the same hash
1277 default: 20
1278 key_sort => CODE - a sort sub
1279 It may be undef, which means no sorting by keys
1280 default: sub { lc $a cmp lc $b }
1281
1282 customs => HASH - special options for certain keys
1283 (whose values are hashes themselves)
1284 may contain: max_key_length, key_sort, customs
1285
1286=end private
1287
1288=cut
1289
1290sub _dump_hash {
1291 croak "first argument should be a hash ref" unless ref $_[0] eq 'HASH';
1292 my $options = shift;
1293 my %hash = @_;
1294
1295 # Use a list to preserve order.
1296 my @pairs;
1297
1298 my $k_sort
1299 = exists $options->{key_sort} ? $options->{key_sort}
1300 : sub { lc $a cmp lc $b };
1301 if ($k_sort) {
1302 croak "'key_sort' should be a coderef" unless ref $k_sort eq 'CODE';
1303 @pairs = _sort_pairs($k_sort, \%hash);
1304 } else { # list of pairs, no sorting
1305 @pairs = @_;
1306 }
1307
1308 my $yaml = $options->{use_header} ? "--- #YAML:1.0\n" : '';
1309 my $indent = $options->{indent} || '';
1310 my $k_length = min(
1311 ($options->{max_key_length} || 20),
1312 max(map { length($_) + 1 } grep { !ref $hash{$_} } keys %hash)
1313 );
1314 my $customs = $options->{customs} || {};
1315
1316 # printf format for key
1317 my $k_format = "%-${k_length}s";
1318
1319 while( @pairs ) {
1320 my($key, $val) = splice @pairs, 0, 2;
1321 $val = '~' unless defined $val;
1322 if(ref $val eq 'HASH') {
1323 if ( keys %$val ) {
1324 my %k_options = ( # options for recursive call
1325 delta => $options->{delta},
1326 use_header => 0,
1327 indent => $indent . $options->{delta},
1328 );
1329 if (exists $customs->{$key}) {
1330 my %k_custom = %{$customs->{$key}};
1331 foreach my $k (qw(key_sort max_key_length customs)) {
1332 $k_options{$k} = $k_custom{$k} if exists $k_custom{$k};
1333 }
1334 }
1335 $yaml .= $indent . "$key:\n"
1336 . _dump_hash(\%k_options, %$val);
1337 }
1338 else {
1339 $yaml .= $indent . "$key: {}\n";
1340 }
1341 }
1342 elsif (ref $val eq 'ARRAY') {
1343 if( @$val ) {
1344 $yaml .= $indent . "$key:\n";
1345
1346 for (@$val) {
1347 croak "only nested arrays of non-refs are supported" if ref $_;
1348 $yaml .= $indent . $options->{delta} . "- $_\n";
1349 }
1350 }
1351 else {
1352 $yaml .= $indent . "$key: []\n";
1353 }
1354 }
1355 elsif( ref $val and !blessed($val) ) {
1356 croak "only nested hashes, arrays and objects are supported";
1357 }
1358 else { # if it's an object, just stringify it
1359 $yaml .= $indent . sprintf "$k_format %s\n", "$key:", $val;
1360 }
1361 };
1362
1363 return $yaml;
1364
1365}
1366
1367sub blessed {
1368 return eval { $_[0]->isa("UNIVERSAL"); };
1369}
1370
1371sub max {
1372 return (sort { $b <=> $a } @_)[0];
1373}
1374
1375sub min {
1376 return (sort { $a <=> $b } @_)[0];
1377}
1378
1379=head3 metafile_file
1380
1381 my $meta_yml = $mm->metafile_file(@metadata_pairs);
1382
1383Turns the @metadata_pairs into YAML.
1384
1385This method does not implement a complete YAML dumper, being limited
1386to dump a hash with values which are strings, undef's or nested hashes
1387and arrays of strings. No quoting/escaping is done.
1388
1389=cut
1390
1391sub metafile_file {
1392 my $self = shift;
1393
1394 my %dump_options = (
1395 use_header => 1,
1396 delta => ' ' x 4,
1397 key_sort => undef,
1398 );
1399 return _dump_hash(\%dump_options, @_);
1400
1401}
1402
1403
1404=head3 distmeta_target
1405
1406 my $make_frag = $mm->distmeta_target;
1407
1408Generates the distmeta target to add META.yml and META.json to the MANIFEST
1409in the distdir.
1410
1411=cut
1412
1413
# spent 2.22s (0+2.22) within ExtUtils::MM_Any::distmeta_target which was called 3 times, avg 738ms/call: # 3 times (0s+2.22s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 738ms/call
sub distmeta_target {
141430s my $self = shift;
1415
141630s61.11s my @add_meta = (
# spent 1.11s making 6 calls to ExtUtils::MM_Win32::oneliner, avg 185ms/call
1417 $self->oneliner(<<'CODE', ['-MExtUtils::Manifest=maniadd']),
1418exit unless -e q{META.yml};
1419eval { maniadd({q{META.yml} => q{Module YAML meta-data (added by MakeMaker)}}) }
1420 or print "Could not add META.yml to MANIFEST: $${'@'}\n"
1421CODE
1422 $self->oneliner(<<'CODE', ['-MExtUtils::Manifest=maniadd'])
1423exit unless -f q{META.json};
1424eval { maniadd({q{META.json} => q{Module JSON meta-data (added by MakeMaker)}}) }
1425 or print "Could not add META.json to MANIFEST: $${'@'}\n"
1426CODE
1427 );
1428
142990s61.11s my @add_meta_to_distdir = map { $self->cd('$(DISTVNAME)', $_) } @add_meta;
# spent 1.11s making 6 calls to ExtUtils::MM_Win32::cd, avg 185ms/call
1430
143130s return sprintf <<'MAKE', @add_meta_to_distdir;
1432distmeta : create_distdir metafile
1433 $(NOECHO) %s
1434 $(NOECHO) %s
1435
1436MAKE
1437
1438}
1439
1440
1441=head3 mymeta
1442
1443 my $mymeta = $mm->mymeta;
1444
1445Generate MYMETA information as a hash either from an existing CPAN Meta file
1446(META.json or META.yml) or from internal data.
1447
1448=cut
1449
1450
# spent 15.6ms (0s+15.6) within ExtUtils::MM_Any::mymeta which was called 3 times, avg 5.20ms/call: # 3 times (0s+15.6ms) by ExtUtils::MakeMaker::flush at line 1192 of ExtUtils/MakeMaker.pm, avg 5.20ms/call
sub mymeta {
145130s my $self = shift;
145230s my $file = shift || ''; # for testing
1453
145430s315.6ms my $mymeta = $self->_mymeta_from_meta($file);
# spent 15.6ms making 3 calls to ExtUtils::MM_Any::_mymeta_from_meta, avg 5.20ms/call
145530s my $v2 = 1;
1456
145730s unless ( $mymeta ) {
145820s20s my @metadata = $self->metafile_data(
# spent 0s making 2 calls to ExtUtils::MM_Any::metafile_data, avg 0s/call
1459 $self->{META_ADD} || {},
1460 $self->{META_MERGE} || {},
1461 );
146220s $mymeta = {@metadata};
146320s $v2 = 0;
1464 }
1465
1466 # Overwrite the non-configure dependency hashes
1467
146830s my $method = $v2
1469 ? '_add_requirements_to_meta_v2'
1470 : '_add_requirements_to_meta_v1_4';
1471
147230s30s $mymeta = { $self->$method( %$mymeta ) };
# spent 0s making 2 calls to ExtUtils::MM_Any::_add_requirements_to_meta_v1_4, avg 0s/call # spent 0s making 1 call to ExtUtils::MM_Any::_add_requirements_to_meta_v2
1473
147430s $mymeta->{dynamic_config} = 0;
1475
147630s return $mymeta;
1477}
1478
1479
1480
# spent 15.6ms (0s+15.6) within ExtUtils::MM_Any::_mymeta_from_meta which was called 3 times, avg 5.20ms/call: # 3 times (0s+15.6ms) by ExtUtils::MM_Any::mymeta at line 1454, avg 5.20ms/call
sub _mymeta_from_meta {
148130s my $self = shift;
148230s my $metafile = shift || ''; # for testing
1483
148430s30s return unless _has_cpan_meta();
# spent 0s making 3 calls to ExtUtils::MM_Any::_has_cpan_meta, avg 0s/call
1485
148630s my $meta;
148730s for my $file ( $metafile, "META.json", "META.yml" ) {
148880s80s next unless -e $file;
# spent 0s making 8 calls to ExtUtils::MM_Any::CORE:ftis, avg 0s/call
148910s eval {
149010s215.6ms $meta = CPAN::Meta->load_file($file)->as_struct( { version => 2 } );
# spent 15.6ms making 1 call to CPAN::Meta::load_file # spent 0s making 1 call to CPAN::Meta::as_struct
1491 };
149210s last if $meta;
1493 }
149430s return unless $meta;
1495
1496 # META.yml before 6.25_01 cannot be trusted. META.yml lived in the source directory.
1497 # There was a good chance the author accidentally uploaded a stale META.yml if they
1498 # rolled their own tarball rather than using "make dist".
149910s10s if ($meta->{generated_by} &&
# spent 0s making 1 call to ExtUtils::MM_Any::CORE:match
1500 $meta->{generated_by} =~ /ExtUtils::MakeMaker version ([\d\._]+)/) {
150130s my $eummv = do { local $^W = 0; $1+0; };
150210s if ($eummv < 6.2501) {
1503 return;
1504 }
1505 }
1506
150710s return $meta;
1508}
1509
1510=head3 write_mymeta
1511
1512 $self->write_mymeta( $mymeta );
1513
1514Write MYMETA information to MYMETA.json and MYMETA.yml.
1515
1516=cut
1517
1518
# spent 109ms (0s+109) within ExtUtils::MM_Any::write_mymeta which was called 3 times, avg 36.4ms/call: # 3 times (0s+109ms) by ExtUtils::MakeMaker::flush at line 1192 of ExtUtils/MakeMaker.pm, avg 36.4ms/call
sub write_mymeta {
151930s my $self = shift;
152030s my $mymeta = shift;
1521
152230s30s return unless _has_cpan_meta();
# spent 0s making 3 calls to ExtUtils::MM_Any::_has_cpan_meta, avg 0s/call
1523
152430s30s _fix_metadata_before_conversion( $mymeta );
# spent 0s making 3 calls to ExtUtils::MM_Any::_fix_metadata_before_conversion, avg 0s/call
1525
1526 # this can still blow up
1527 # not sure if i should just eval this and skip file creation if it
1528 # blows up
152930s346.8ms my $meta_obj = CPAN::Meta->new( $mymeta, { lazy_validation => 1 } );
# spent 46.8ms making 3 calls to CPAN::Meta::new, avg 15.6ms/call
153030s315.6ms $meta_obj->save( 'MYMETA.json' );
# spent 15.6ms making 3 calls to CPAN::Meta::save, avg 5.20ms/call
153130s346.8ms $meta_obj->save( 'MYMETA.yml', { version => "1.4" } );
# spent 46.8ms making 3 calls to CPAN::Meta::save, avg 15.6ms/call
153230s return 1;
1533}
1534
1535=head3 realclean (o)
1536
1537Defines the realclean target.
1538
1539=cut
1540
1541
# spent 0s within ExtUtils::MM_Any::realclean which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub realclean {
154230s my($self, %attribs) = @_;
1543
154430s my @dirs = qw($(DISTVNAME));
154530s my @files = qw($(FIRST_MAKEFILE) $(MAKEFILE_OLD));
1546
1547 # Special exception for the perl core where INST_* is not in blib.
1548 # This cleans up the files built from the ext/ directory (all XS).
154930s if( $self->{PERL_CORE} ) {
1550 push @dirs, qw($(INST_AUTODIR) $(INST_ARCHAUTODIR));
1551 push @files, values %{$self->{PM}};
1552 }
1553
155430s30s if( $self->has_link_code ){
# spent 0s making 3 calls to ExtUtils::MM_Unix::has_link_code, avg 0s/call
1555 push @files, qw($(OBJECT));
1556 }
1557
155830s if( $attribs{FILES} ) {
1559 if( ref $attribs{FILES} ) {
1560 push @dirs, @{ $attribs{FILES} };
1561 }
1562 else {
1563 push @dirs, split /\s+/, $attribs{FILES};
1564 }
1565 }
1566
1567 # Occasionally files are repeated several times from different sources
156890s { my(%f) = map { ($_ => 1) } @files; @files = keys %f; }
156990s { my(%d) = map { ($_ => 1) } @dirs; @dirs = keys %d; }
1570
157130s30s my $rm_cmd = join "\n\t", map { "$_" }
# spent 0s making 3 calls to ExtUtils::MM_Any::split_command, avg 0s/call
1572 $self->split_command('- $(RM_F)', @files);
157330s30s my $rmf_cmd = join "\n\t", map { "$_" }
# spent 0s making 3 calls to ExtUtils::MM_Any::split_command, avg 0s/call
1574 $self->split_command('- $(RM_RF)', @dirs);
1575
157630s my $m = sprintf <<'MAKE', $rm_cmd, $rmf_cmd;
1577# Delete temporary files (via clean) and also delete dist files
1578realclean purge :: clean realclean_subdirs
1579 %s
1580 %s
1581MAKE
1582
158330s $m .= "\t$attribs{POSTOP}\n" if $attribs{POSTOP};
1584
158530s return $m;
1586}
1587
1588
1589=head3 realclean_subdirs_target
1590
1591 my $make_frag = $MM->realclean_subdirs_target;
1592
1593Returns the realclean_subdirs target. This is used by the realclean
1594target to call realclean on any subdirectories which contain Makefiles.
1595
1596=cut
1597
1598
# spent 749ms (0s+749) within ExtUtils::MM_Any::realclean_subdirs_target which was called 3 times, avg 250ms/call: # 3 times (0s+749ms) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 250ms/call
sub realclean_subdirs_target {
159930s my $self = shift;
1600
160130s return <<'NOOP_FRAG' unless @{$self->{DIR}};
1602realclean_subdirs :
1603 $(NOECHO) $(NOOP)
1604NOOP_FRAG
1605
160610s my $rclean = "realclean_subdirs :\n";
1607
160810s foreach my $dir (@{$self->{DIR}}) {
160920s foreach my $makefile ('$(MAKEFILE_OLD)', '$(FIRST_MAKEFILE)' ) {
161040s4749ms my $subrclean .= $self->oneliner(sprintf <<'CODE', $dir, ($makefile) x 2);
# spent 749ms making 4 calls to ExtUtils::MM_Win32::oneliner, avg 187ms/call
1611chdir '%s'; system '$(MAKE) $(USEMAKEFILE) %s realclean' if -f '%s';
1612CODE
1613
161440s $rclean .= sprintf <<'RCLEAN', $subrclean;
1615 - %s
1616RCLEAN
1617
1618 }
1619 }
1620
162110s return $rclean;
1622}
1623
1624
1625=head3 signature_target
1626
1627 my $target = $mm->signature_target;
1628
1629Generate the signature target.
1630
1631Writes the file SIGNATURE with "cpansign -s".
1632
1633=cut
1634
1635
# spent 0s within ExtUtils::MM_Any::signature_target which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub signature_target {
163630s my $self = shift;
1637
163830s return <<'MAKE_FRAG';
1639signature :
1640 cpansign -s
1641MAKE_FRAG
1642
1643}
1644
1645
1646=head3 distsignature_target
1647
1648 my $make_frag = $mm->distsignature_target;
1649
1650Generates the distsignature target to add SIGNATURE to the MANIFEST in the
1651distdir.
1652
1653=cut
1654
1655
# spent 2.22s (0+2.22) within ExtUtils::MM_Any::distsignature_target which was called 3 times, avg 738ms/call: # 3 times (0s+2.22s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 738ms/call
sub distsignature_target {
165630s my $self = shift;
1657
165830s3546ms my $add_sign = $self->oneliner(<<'CODE', ['-MExtUtils::Manifest=maniadd']);
# spent 546ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 182ms/call
1659eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) }
1660 or print "Could not add SIGNATURE to MANIFEST: $${'@'}\n"
1661CODE
1662
166330s3562ms my $sign_dist = $self->cd('$(DISTVNAME)' => 'cpansign -s');
# spent 562ms making 3 calls to ExtUtils::MM_Win32::cd, avg 187ms/call
1664
1665 # cpansign -s complains if SIGNATURE is in the MANIFEST yet does not
1666 # exist
166730s3562ms my $touch_sig = $self->cd('$(DISTVNAME)' => '$(TOUCH) SIGNATURE');
# spent 562ms making 3 calls to ExtUtils::MM_Win32::cd, avg 187ms/call
166830s3546ms my $add_sign_to_dist = $self->cd('$(DISTVNAME)' => $add_sign );
# spent 546ms making 3 calls to ExtUtils::MM_Win32::cd, avg 182ms/call
1669
167030s return sprintf <<'MAKE', $add_sign_to_dist, $touch_sig, $sign_dist
1671distsignature : create_distdir
1672 $(NOECHO) %s
1673 $(NOECHO) %s
1674 %s
1675
1676MAKE
1677
1678}
1679
1680
1681=head3 special_targets
1682
1683 my $make_frag = $mm->special_targets
1684
1685Returns a make fragment containing any targets which have special
1686meaning to make. For example, .SUFFIXES and .PHONY.
1687
1688=cut
1689
1690
# spent 0s within ExtUtils::MM_Any::special_targets which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Win32::special_targets at line 275 of ExtUtils/MM_Win32.pm, avg 0s/call
sub special_targets {
169130s my $make_frag = <<'MAKE_FRAG';
1692.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
1693
1694.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
1695
1696MAKE_FRAG
1697
169830s $make_frag .= <<'MAKE_FRAG' if $ENV{CLEARCASE_ROOT};
1699.NO_CONFIG_REC: Makefile
1700
1701MAKE_FRAG
1702
170330s return $make_frag;
1704}
1705
- -
1709=head2 Init methods
1710
1711Methods which help initialize the MakeMaker object and macros.
1712
1713
1714=head3 init_ABSTRACT
1715
1716 $mm->init_ABSTRACT
1717
1718=cut
1719
1720
# spent 0s within ExtUtils::MM_Any::init_ABSTRACT which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 663 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_ABSTRACT {
172130s my $self = shift;
1722
172330s if( $self->{ABSTRACT_FROM} and $self->{ABSTRACT} ) {
1724 warn "Both ABSTRACT_FROM and ABSTRACT are set. ".
1725 "Ignoring ABSTRACT_FROM.\n";
1726 return;
1727 }
1728
172930s if ($self->{ABSTRACT_FROM}){
1730 $self->{ABSTRACT} = $self->parse_abstract($self->{ABSTRACT_FROM}) or
1731 carp "WARNING: Setting ABSTRACT via file ".
1732 "'$self->{ABSTRACT_FROM}' failed\n";
1733 }
1734
173530s10s if ($self->{ABSTRACT} && $self->{ABSTRACT} =~ m![[:cntrl:]]+!) {
# spent 0s making 1 call to ExtUtils::MM_Any::CORE:match
1736 warn "WARNING: ABSTRACT contains control character(s),".
1737 " they will be removed\n";
1738 $self->{ABSTRACT} =~ s![[:cntrl:]]+!!g;
1739 return;
1740 }
1741}
1742
1743=head3 init_INST
1744
1745 $mm->init_INST;
1746
1747Called by init_main. Sets up all INST_* variables except those related
1748to XS code. Those are handled in init_xs.
1749
1750=cut
1751
1752
# spent 0s within ExtUtils::MM_Any::init_INST which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 653 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_INST {
175330s my($self) = shift;
1754
175530s10s $self->{INST_ARCHLIB} ||= $self->catdir($Curdir,"blib","arch");
# spent 0s making 1 call to File::Spec::Win32::catdir
175630s10s $self->{INST_BIN} ||= $self->catdir($Curdir,'blib','bin');
# spent 0s making 1 call to File::Spec::Win32::catdir
1757
1758 # INST_LIB typically pre-set if building an extension after
1759 # perl has been built and installed. Setting INST_LIB allows
1760 # you to build directly into, say $Config{privlibexp}.
176130s unless ($self->{INST_LIB}){
1762 if ($self->{PERL_CORE}) {
1763 $self->{INST_LIB} = $self->{INST_ARCHLIB} = $self->{PERL_LIB};
1764 } else {
176510s10s $self->{INST_LIB} = $self->catdir($Curdir,"blib","lib");
# spent 0s making 1 call to File::Spec::Win32::catdir
1766 }
1767 }
1768
176930s my @parentdir = split(/::/, $self->{PARENT_NAME});
177030s30s $self->{INST_LIBDIR} = $self->catdir('$(INST_LIB)', @parentdir);
# spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call
177130s30s $self->{INST_ARCHLIBDIR} = $self->catdir('$(INST_ARCHLIB)', @parentdir);
# spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call
177230s30s $self->{INST_AUTODIR} = $self->catdir('$(INST_LIB)', 'auto',
# spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call
1773 '$(FULLEXT)');
177430s30s $self->{INST_ARCHAUTODIR} = $self->catdir('$(INST_ARCHLIB)', 'auto',
# spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call
1775 '$(FULLEXT)');
1776
177730s10s $self->{INST_SCRIPT} ||= $self->catdir($Curdir,'blib','script');
# spent 0s making 1 call to File::Spec::Win32::catdir
1778
177930s10s $self->{INST_MAN1DIR} ||= $self->catdir($Curdir,'blib','man1');
# spent 0s making 1 call to File::Spec::Win32::catdir
178030s10s $self->{INST_MAN3DIR} ||= $self->catdir($Curdir,'blib','man3');
# spent 0s making 1 call to File::Spec::Win32::catdir
1781
178230s return 1;
1783}
1784
1785
1786=head3 init_INSTALL
1787
1788 $mm->init_INSTALL;
1789
1790Called by init_main. Sets up all INSTALL_* variables (except
1791INSTALLDIRS) and *PREFIX.
1792
1793=cut
1794
1795
# spent 0s within ExtUtils::MM_Any::init_INSTALL which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 654 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_INSTALL {
179630s my($self) = shift;
1797
179830s if( $self->{ARGS}{INSTALL_BASE} and $self->{ARGS}{PREFIX} ) {
1799 die "Only one of PREFIX or INSTALL_BASE can be given. Not both.\n";
1800 }
1801
180230s if( $self->{ARGS}{INSTALL_BASE} ) {
1803 $self->init_INSTALL_from_INSTALL_BASE;
1804 }
1805 else {
180630s30s $self->init_INSTALL_from_PREFIX;
# spent 0s making 3 calls to ExtUtils::MM_Any::init_INSTALL_from_PREFIX, avg 0s/call
1807 }
1808}
1809
1810
1811=head3 init_INSTALL_from_PREFIX
1812
1813 $mm->init_INSTALL_from_PREFIX;
1814
1815=cut
1816
1817
# spent 0s within ExtUtils::MM_Any::init_INSTALL_from_PREFIX which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::init_INSTALL at line 1806, avg 0s/call
sub init_INSTALL_from_PREFIX {
181830s my $self = shift;
1819
182030s30s $self->init_lib2arch;
# spent 0s making 3 calls to ExtUtils::MM_Unix::init_lib2arch, avg 0s/call
1821
1822 # There are often no Config.pm defaults for these new man variables so
1823 # we fall back to the old behavior which is to use installman*dir
182430s foreach my $num (1, 3) {
182560s my $k = 'installsiteman'.$num.'dir';
1826
182760s $self->{uc $k} ||= uc "\$(installman${num}dir)"
1828 unless $Config{$k};
1829 }
1830
183130s foreach my $num (1, 3) {
183260s my $k = 'installvendorman'.$num.'dir';
1833
183460s unless( $Config{$k} ) {
1835 $self->{uc $k} ||= $Config{usevendorprefix}
1836 ? uc "\$(installman${num}dir)"
1837 : '';
1838 }
1839 }
1840
184130s $self->{INSTALLSITEBIN} ||= '$(INSTALLBIN)'
1842 unless $Config{installsitebin};
184330s $self->{INSTALLSITESCRIPT} ||= '$(INSTALLSCRIPT)'
1844 unless $Config{installsitescript};
1845
184630s unless( $Config{installvendorbin} ) {
1847 $self->{INSTALLVENDORBIN} ||= $Config{usevendorprefix}
1848 ? $Config{installbin}
1849 : '';
1850 }
185130s unless( $Config{installvendorscript} ) {
1852 $self->{INSTALLVENDORSCRIPT} ||= $Config{usevendorprefix}
1853 ? $Config{installscript}
1854 : '';
1855 }
1856
1857
185830s my $iprefix = $Config{installprefixexp} || $Config{installprefix} ||
1859 $Config{prefixexp} || $Config{prefix} || '';
186030s my $vprefix = $Config{usevendorprefix} ? $Config{vendorprefixexp} : '';
186130s my $sprefix = $Config{siteprefixexp} || '';
1862
1863 # 5.005_03 doesn't have a siteprefix.
186430s $sprefix = $iprefix unless $sprefix;
1865
1866
186730s $self->{PREFIX} ||= '';
1868
186930s if( $self->{PREFIX} ) {
1870 @{$self}{qw(PERLPREFIX SITEPREFIX VENDORPREFIX)} =
1871 ('$(PREFIX)') x 3;
1872 }
1873 else {
187430s $self->{PERLPREFIX} ||= $iprefix;
187530s $self->{SITEPREFIX} ||= $sprefix;
187630s $self->{VENDORPREFIX} ||= $vprefix;
1877
1878 # Lots of MM extension authors like to use $(PREFIX) so we
1879 # put something sensible in there no matter what.
188030s $self->{PREFIX} = '$('.uc $self->{INSTALLDIRS}.'PREFIX)';
1881 }
1882
188330s my $arch = $Config{archname};
188430s my $version = $Config{version};
1885
1886 # default style
188730s my $libstyle = $Config{installstyle} || 'lib/perl5';
188830s my $manstyle = '';
1889
189030s if( $self->{LIBSTYLE} ) {
1891 $libstyle = $self->{LIBSTYLE};
1892 $manstyle = $self->{LIBSTYLE} eq 'lib/perl5' ? 'lib/perl5' : '';
1893 }
1894
1895 # Some systems, like VOS, set installman*dir to '' if they can't
1896 # read man pages.
189730s for my $num (1, 3) {
189860s $self->{'INSTALLMAN'.$num.'DIR'} ||= 'none'
1899 unless $Config{'installman'.$num.'dir'};
1900 }
1901
190230s my %bin_layouts =
1903 (
1904 bin => { s => $iprefix,
1905 t => 'perl',
1906 d => 'bin' },
1907 vendorbin => { s => $vprefix,
1908 t => 'vendor',
1909 d => 'bin' },
1910 sitebin => { s => $sprefix,
1911 t => 'site',
1912 d => 'bin' },
1913 script => { s => $iprefix,
1914 t => 'perl',
1915 d => 'bin' },
1916 vendorscript=> { s => $vprefix,
1917 t => 'vendor',
1918 d => 'bin' },
1919 sitescript => { s => $sprefix,
1920 t => 'site',
1921 d => 'bin' },
1922 );
1923
192430s my %man_layouts =
1925 (
1926 man1dir => { s => $iprefix,
1927 t => 'perl',
1928 d => 'man/man1',
1929 style => $manstyle, },
1930 siteman1dir => { s => $sprefix,
1931 t => 'site',
1932 d => 'man/man1',
1933 style => $manstyle, },
1934 vendorman1dir => { s => $vprefix,
1935 t => 'vendor',
1936 d => 'man/man1',
1937 style => $manstyle, },
1938
1939 man3dir => { s => $iprefix,
1940 t => 'perl',
1941 d => 'man/man3',
1942 style => $manstyle, },
1943 siteman3dir => { s => $sprefix,
1944 t => 'site',
1945 d => 'man/man3',
1946 style => $manstyle, },
1947 vendorman3dir => { s => $vprefix,
1948 t => 'vendor',
1949 d => 'man/man3',
1950 style => $manstyle, },
1951 );
1952
195330s my %lib_layouts =
1954 (
1955 privlib => { s => $iprefix,
1956 t => 'perl',
1957 d => '',
1958 style => $libstyle, },
1959 vendorlib => { s => $vprefix,
1960 t => 'vendor',
1961 d => '',
1962 style => $libstyle, },
1963 sitelib => { s => $sprefix,
1964 t => 'site',
1965 d => 'site_perl',
1966 style => $libstyle, },
1967
1968 archlib => { s => $iprefix,
1969 t => 'perl',
1970 d => "$version/$arch",
1971 style => $libstyle },
1972 vendorarch => { s => $vprefix,
1973 t => 'vendor',
1974 d => "$version/$arch",
1975 style => $libstyle },
1976 sitearch => { s => $sprefix,
1977 t => 'site',
1978 d => "site_perl/$version/$arch",
1979 style => $libstyle },
1980 );
1981
1982
1983 # Special case for LIB.
198430s if( $self->{LIB} ) {
1985 foreach my $var (keys %lib_layouts) {
1986 my $Installvar = uc "install$var";
1987
1988 if( $var =~ /arch/ ) {
1989 $self->{$Installvar} ||=
1990 $self->catdir($self->{LIB}, $Config{archname});
1991 }
1992 else {
1993 $self->{$Installvar} ||= $self->{LIB};
1994 }
1995 }
1996 }
1997
199830s my %type2prefix = ( perl => 'PERLPREFIX',
1999 site => 'SITEPREFIX',
2000 vendor => 'VENDORPREFIX'
2001 );
2002
200330s my %layouts = (%bin_layouts, %man_layouts, %lib_layouts);
200430s while( my($var, $layout) = each(%layouts) ) {
2005540s my($s, $t, $d, $style) = @{$layout}{qw(s t d style)};
2006540s my $r = '$('.$type2prefix{$t}.')';
2007
2008540s warn "Prefixing $var\n" if $Verbose >= 2;
2009
2010540s my $installvar = "install$var";
2011540s my $Installvar = uc $installvar;
2012540s next if $self->{$Installvar};
2013
2014360s $d = "$style/$d" if $style;
2015360s360s $self->prefixify($installvar, $s, $r, $d);
# spent 0s making 36 calls to ExtUtils::MM_Unix::prefixify, avg 0s/call
2016
2017360s warn " $Installvar == $self->{$Installvar}\n"
2018 if $Verbose >= 2;
2019 }
2020
2021 # Generate these if they weren't figured out.
202230s $self->{VENDORARCHEXP} ||= $self->{INSTALLVENDORARCH};
202330s $self->{VENDORLIBEXP} ||= $self->{INSTALLVENDORLIB};
2024
202530s return 1;
2026}
2027
2028
2029=head3 init_from_INSTALL_BASE
2030
2031 $mm->init_from_INSTALL_BASE
2032
2033=cut
2034
203510smy %map = (
2036 lib => [qw(lib perl5)],
2037 arch => [('lib', 'perl5', $Config{archname})],
2038 bin => [qw(bin)],
2039 man1dir => [qw(man man1)],
2040 man3dir => [qw(man man3)]
2041 );
204210s$map{script} = $map{bin};
2043
2044sub init_INSTALL_from_INSTALL_BASE {
2045 my $self = shift;
2046
2047 @{$self}{qw(PREFIX VENDORPREFIX SITEPREFIX PERLPREFIX)} =
2048 '$(INSTALL_BASE)';
2049
2050 my %install;
2051 foreach my $thing (keys %map) {
2052 foreach my $dir (('', 'SITE', 'VENDOR')) {
2053 my $uc_thing = uc $thing;
2054 my $key = "INSTALL".$dir.$uc_thing;
2055
2056 $install{$key} ||=
2057 $self->catdir('$(INSTALL_BASE)', @{$map{$thing}});
2058 }
2059 }
2060
2061 # Adjust for variable quirks.
2062 $install{INSTALLARCHLIB} ||= delete $install{INSTALLARCH};
2063 $install{INSTALLPRIVLIB} ||= delete $install{INSTALLLIB};
2064
2065 foreach my $key (keys %install) {
2066 $self->{$key} ||= $install{$key};
2067 }
2068
2069 return 1;
2070}
2071
2072
2073=head3 init_VERSION I<Abstract>
2074
2075 $mm->init_VERSION
2076
2077Initialize macros representing versions of MakeMaker and other tools
2078
2079MAKEMAKER: path to the MakeMaker module.
2080
2081MM_VERSION: ExtUtils::MakeMaker Version
2082
2083MM_REVISION: ExtUtils::MakeMaker version control revision (for backwards
2084 compat)
2085
2086VERSION: version of your module
2087
2088VERSION_MACRO: which macro represents the version (usually 'VERSION')
2089
2090VERSION_SYM: like version but safe for use as an RCS revision number
2091
2092DEFINE_VERSION: -D line to set the module version when compiling
2093
2094XS_VERSION: version in your .xs file. Defaults to $(VERSION)
2095
2096XS_VERSION_MACRO: which macro represents the XS version.
2097
2098XS_DEFINE_VERSION: -D line to set the xs version when compiling.
2099
2100Called by init_main.
2101
2102=cut
2103
2104
# spent 15.6ms (0s+15.6) within ExtUtils::MM_Any::init_VERSION which was called 3 times, avg 5.20ms/call: # 3 times (0s+15.6ms) by ExtUtils::MakeMaker::new at line 651 of ExtUtils/MakeMaker.pm, avg 5.20ms/call
sub init_VERSION {
210530s my($self) = shift;
2106
210730s $self->{MAKEMAKER} = $ExtUtils::MakeMaker::Filename;
210830s $self->{MM_VERSION} = $ExtUtils::MakeMaker::VERSION;
210930s $self->{MM_REVISION}= $ExtUtils::MakeMaker::Revision;
211030s $self->{VERSION_FROM} ||= '';
2111
211230s if ($self->{VERSION_FROM}){
211330s315.6ms $self->{VERSION} = $self->parse_version($self->{VERSION_FROM});
# spent 15.6ms making 3 calls to ExtUtils::MM_Unix::parse_version, avg 5.20ms/call
211430s if( $self->{VERSION} eq 'undef' ) {
2115 carp("WARNING: Setting VERSION via file ".
2116 "'$self->{VERSION_FROM}' failed\n");
2117 }
2118 }
2119
212030s if (defined $self->{VERSION}) {
212130s30s if ( $self->{VERSION} !~ /^\s*v?[\d_\.]+\s*$/ ) {
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:match, avg 0s/call
2122 require version;
2123 my $normal = eval { version->new( $self->{VERSION} ) };
2124 $self->{VERSION} = $normal if defined $normal;
2125 }
212630s30s $self->{VERSION} =~ s/^\s+//;
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call
212730s30s $self->{VERSION} =~ s/\s+$//;
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call
2128 }
2129 else {
2130 $self->{VERSION} = '';
2131 }
2132
2133
213430s $self->{VERSION_MACRO} = 'VERSION';
213530s30s ($self->{VERSION_SYM} = $self->{VERSION}) =~ s/\W/_/g;
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call
213630s $self->{DEFINE_VERSION} = '-D$(VERSION_MACRO)=\"$(VERSION)\"';
2137
2138
2139 # Graham Barr and Paul Marquess had some ideas how to ensure
2140 # version compatibility between the *.pm file and the
2141 # corresponding *.xs file. The bottom line was, that we need an
2142 # XS_VERSION macro that defaults to VERSION:
214330s $self->{XS_VERSION} ||= $self->{VERSION};
2144
214530s $self->{XS_VERSION_MACRO} = 'XS_VERSION';
214630s $self->{XS_DEFINE_VERSION} = '-D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"';
2147
2148}
2149
2150
2151=head3 init_tools
2152
2153 $MM->init_tools();
2154
2155Initializes the simple macro definitions used by tools_other() and
2156places them in the $MM object. These use conservative cross platform
2157versions and should be overridden with platform specific versions for
2158performance.
2159
2160Defines at least these macros.
2161
2162 Macro Description
2163
2164 NOOP Do nothing
2165 NOECHO Tell make not to display the command itself
2166
2167 SHELL Program used to run shell commands
2168
2169 ECHO Print text adding a newline on the end
2170 RM_F Remove a file
2171 RM_RF Remove a directory
2172 TOUCH Update a file's timestamp
2173 TEST_F Test for a file's existence
2174 TEST_S Test the size of a file
2175 CP Copy a file
2176 CP_NONEMPTY Copy a file if it is not empty
2177 MV Move a file
2178 CHMOD Change permissions on a file
2179 FALSE Exit with non-zero
2180 TRUE Exit with zero
2181
2182 UMASK_NULL Nullify umask
2183 DEV_NULL Suppress all command output
2184
2185=cut
2186
2187
# spent 10.4s (0+10.4) within ExtUtils::MM_Any::init_tools which was called 3 times, avg 3.46s/call: # 3 times (0s+10.4s) by ExtUtils::MM_Win32::init_tools at line 161 of ExtUtils/MM_Win32.pm, avg 3.46s/call
sub init_tools {
218830s my $self = shift;
2189
219030s3562ms $self->{ECHO} ||= $self->oneliner('binmode STDOUT, qq{:raw}; print qq{@ARGV}', ['-l']);
# spent 562ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 187ms/call
219130s3530ms $self->{ECHO_N} ||= $self->oneliner('print qq{@ARGV}');
# spent 530ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 177ms/call
2192
219330s3562ms $self->{TOUCH} ||= $self->oneliner('touch', ["-MExtUtils::Command"]);
# spent 562ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 187ms/call
219430s3546ms $self->{CHMOD} ||= $self->oneliner('chmod', ["-MExtUtils::Command"]);
# spent 546ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 182ms/call
219530s3530ms $self->{RM_F} ||= $self->oneliner('rm_f', ["-MExtUtils::Command"]);
# spent 530ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 177ms/call
219630s3562ms $self->{RM_RF} ||= $self->oneliner('rm_rf', ["-MExtUtils::Command"]);
# spent 562ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 187ms/call
219730s3546ms $self->{TEST_F} ||= $self->oneliner('test_f', ["-MExtUtils::Command"]);
# spent 546ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 182ms/call
219830s3546ms $self->{TEST_S} ||= $self->oneliner('test_s', ["-MExtUtils::Command::MM"]);
# spent 546ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 182ms/call
219930s3546ms $self->{CP_NONEMPTY} ||= $self->oneliner('cp_nonempty', ["-MExtUtils::Command::MM"]);
# spent 546ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 182ms/call
220030s3562ms $self->{FALSE} ||= $self->oneliner('exit 1');
# spent 562ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 187ms/call
220130s3530ms $self->{TRUE} ||= $self->oneliner('exit 0');
# spent 530ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 177ms/call
2202
220330s3546ms $self->{MKPATH} ||= $self->oneliner('mkpath', ["-MExtUtils::Command"]);
# spent 546ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 182ms/call
2204
220530s3546ms $self->{CP} ||= $self->oneliner('cp', ["-MExtUtils::Command"]);
# spent 546ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 182ms/call
220630s3562ms $self->{MV} ||= $self->oneliner('mv', ["-MExtUtils::Command"]);
# spent 562ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 187ms/call
2207
220830s3546ms $self->{MOD_INSTALL} ||=
# spent 546ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 182ms/call
2209 $self->oneliner(<<'CODE', ['-MExtUtils::Install']);
2210install([ from_to => {@ARGV}, verbose => '$(VERBINST)', uninstall_shadows => '$(UNINST)', dir_mode => '$(PERM_DIR)' ]);
2211CODE
221230s3546ms $self->{DOC_INSTALL} ||= $self->oneliner('perllocal_install', ["-MExtUtils::Command::MM"]);
# spent 546ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 182ms/call
221330s3530ms $self->{UNINSTALL} ||= $self->oneliner('uninstall', ["-MExtUtils::Command::MM"]);
# spent 530ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 177ms/call
221430s3562ms $self->{WARN_IF_OLD_PACKLIST} ||=
# spent 562ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 187ms/call
2215 $self->oneliner('warn_if_old_packlist', ["-MExtUtils::Command::MM"]);
221630s $self->{FIXIN} ||= $self->oneliner('MY->fixin(shift)', ["-MExtUtils::MY"]);
221730s3530ms $self->{EQUALIZE_TIMESTAMP} ||= $self->oneliner('eqtime', ["-MExtUtils::Command"]);
# spent 530ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 177ms/call
2218
221930s $self->{UNINST} ||= 0;
222030s $self->{VERBINST} ||= 0;
2221
222230s $self->{SHELL} ||= $Config{sh};
2223
2224 # UMASK_NULL is not used by MakeMaker but some CPAN modules
2225 # make use of it.
222630s $self->{UMASK_NULL} ||= "umask 0";
2227
2228 # Not the greatest default, but its something.
222930s $self->{DEV_NULL} ||= "> /dev/null 2>&1";
2230
223130s $self->{NOOP} ||= '$(TRUE)';
223230s $self->{NOECHO} = '@' unless defined $self->{NOECHO};
2233
223430s $self->{FIRST_MAKEFILE} ||= $self->{MAKEFILE} || 'Makefile';
223530s $self->{MAKEFILE} ||= $self->{FIRST_MAKEFILE};
223630s $self->{MAKEFILE_OLD} ||= $self->{MAKEFILE}.'.old';
223730s $self->{MAKE_APERL_FILE} ||= $self->{MAKEFILE}.'.aperl';
2238
2239 # Not everybody uses -f to indicate "use this Makefile instead"
224030s $self->{USEMAKEFILE} ||= '-f';
2241
2242 # Some makes require a wrapper around macros passed in on the command
2243 # line.
224430s $self->{MACROSTART} ||= '';
224530s $self->{MACROEND} ||= '';
2246
224730s return;
2248}
2249
2250
2251=head3 init_others
2252
2253 $MM->init_others();
2254
2255Initializes the macro definitions having to do with compiling and
2256linking used by tools_other() and places them in the $MM object.
2257
2258If there is no description, its the same as the parameter to
2259WriteMakefile() documented in ExtUtils::MakeMaker.
2260
2261=cut
2262
2263
# spent 46.8ms (0s+46.8) within ExtUtils::MM_Any::init_others which was called 3 times, avg 15.6ms/call: # 3 times (0s+46.8ms) by ExtUtils::MM_Win32::init_others at line 186 of ExtUtils/MM_Win32.pm, avg 15.6ms/call
sub init_others {
226430s my $self = shift;
2265
226630s $self->{LD_RUN_PATH} = "";
2267
226830s30s $self->{LIBS} = $self->_fix_libs($self->{LIBS});
# spent 0s making 3 calls to ExtUtils::MM_Any::_fix_libs, avg 0s/call
2269
2270 # Compute EXTRALIBS, BSLOADLIBS and LDLOADLIBS from $self->{LIBS}
227130s foreach my $libs ( @{$self->{LIBS}} ){
227230s30s $libs =~ s/^\s*(.*\S)\s*$/$1/; # remove leading and trailing whitespace
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call
227330s346.8ms my(@libs) = $self->extliblist($libs);
# spent 46.8ms making 3 calls to ExtUtils::MM_Unix::extliblist, avg 15.6ms/call
227430s if ($libs[0] or $libs[1] or $libs[2]){
2275 # LD_RUN_PATH now computed by ExtUtils::Liblist
227630s ($self->{EXTRALIBS}, $self->{BSLOADLIBS},
2277 $self->{LDLOADLIBS}, $self->{LD_RUN_PATH}) = @libs;
227830s last;
2279 }
2280 }
2281
228230s if ( $self->{OBJECT} ) {
2283 $self->{OBJECT} = join(" ", @{$self->{OBJECT}}) if ref $self->{OBJECT};
2284 $self->{OBJECT} =~ s!\.o(bj)?\b!\$(OBJ_EXT)!g;
2285 } elsif ( $self->{MAGICXS} && @{$self->{O_FILES}||[]} ) {
2286 $self->{OBJECT} = join(" ", @{$self->{O_FILES}});
2287 $self->{OBJECT} =~ s!\.o(bj)?\b!\$(OBJ_EXT)!g;
2288 } else {
2289 # init_dirscan should have found out, if we have C files
229030s $self->{OBJECT} = "";
229130s $self->{OBJECT} = '$(BASEEXT)$(OBJ_EXT)' if @{$self->{C}||[]};
2292 }
229330s30s $self->{OBJECT} =~ s/\n+/ \\\n\t/g;
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:subst, avg 0s/call
2294
229530s30s $self->{BOOTDEP} = (-f "$self->{BASEEXT}_BS") ? "$self->{BASEEXT}_BS" : "";
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:ftfile, avg 0s/call
229630s $self->{PERLMAINCC} ||= '$(CC)';
229730s $self->{LDFROM} = '$(OBJECT)' unless $self->{LDFROM};
2298
2299 # Sanity check: don't define LINKTYPE = dynamic if we're skipping
2300 # the 'dynamic' section of MM. We don't have this problem with
2301 # 'static', since we either must use it (%Config says we can't
2302 # use dynamic loading) or the caller asked for it explicitly.
230330s if (!$self->{LINKTYPE}) {
2304 $self->{LINKTYPE} = $self->{SKIPHASH}{'dynamic'}
2305 ? 'static'
2306 : ($Config{usedl} ? 'dynamic' : 'static');
2307 }
2308
230930s return;
2310}
2311
2312
2313# Lets look at $self->{LIBS} carefully: It may be an anon array, a string or
2314# undefined. In any case we turn it into an anon array
2315
# spent 0s within ExtUtils::MM_Any::_fix_libs which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::init_others at line 2268, avg 0s/call
sub _fix_libs {
231630s my($self, $libs) = @_;
2317
231830s return !defined $libs ? [''] :
2319 !ref $libs ? [$libs] :
2320 !defined $libs->[0] ? [''] :
2321 $libs ;
2322}
2323
2324
2325=head3 tools_other
2326
2327 my $make_frag = $MM->tools_other;
2328
2329Returns a make fragment containing definitions for the macros init_others()
2330initializes.
2331
2332=cut
2333
2334
# spent 0s within ExtUtils::MM_Any::tools_other which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub tools_other {
233530s my($self) = shift;
233630s my @m;
2337
2338 # We set PM_FILTER as late as possible so it can see all the earlier
2339 # on macro-order sensitive makes such as nmake.
234030s for my $tool (qw{ SHELL CHMOD CP MV NOOP NOECHO RM_F RM_RF TEST_F TOUCH
2341 UMASK_NULL DEV_NULL MKPATH EQUALIZE_TIMESTAMP
2342 FALSE TRUE
2343 ECHO ECHO_N
2344 UNINST VERBINST
2345 MOD_INSTALL DOC_INSTALL UNINSTALL
2346 WARN_IF_OLD_PACKLIST
2347 MACROSTART MACROEND
2348 USEMAKEFILE
2349 PM_FILTER
2350 FIXIN
2351 CP_NONEMPTY
2352 } )
2353 {
2354900s next unless defined $self->{$tool};
2355840s push @m, "$tool = $self->{$tool}\n";
2356 }
2357
235830s return join "", @m;
2359}
2360
2361
2362=head3 init_DIRFILESEP I<Abstract>
2363
2364 $MM->init_DIRFILESEP;
2365 my $dirfilesep = $MM->{DIRFILESEP};
2366
2367Initializes the DIRFILESEP macro which is the separator between the
2368directory and filename in a filepath. ie. / on Unix, \ on Win32 and
2369nothing on VMS.
2370
2371For example:
2372
2373 # instead of $(INST_ARCHAUTODIR)/extralibs.ld
2374 $(INST_ARCHAUTODIR)$(DIRFILESEP)extralibs.ld
2375
2376Something of a hack but it prevents a lot of code duplication between
2377MM_* variants.
2378
2379Do not use this as a separator between directories. Some operating
2380systems use different separators between subdirectories as between
2381directories and filenames (for example: VOLUME:[dir1.dir2]file on VMS).
2382
2383=head3 init_linker I<Abstract>
2384
2385 $mm->init_linker;
2386
2387Initialize macros which have to do with linking.
2388
2389PERL_ARCHIVE: path to libperl.a equivalent to be linked to dynamic
2390extensions.
2391
2392PERL_ARCHIVE_AFTER: path to a library which should be put on the
2393linker command line I<after> the external libraries to be linked to
2394dynamic extensions. This may be needed if the linker is one-pass, and
2395Perl includes some overrides for C RTL functions, such as malloc().
2396
2397EXPORT_LIST: name of a file that is passed to linker to define symbols
2398to be exported.
2399
2400Some OSes do not need these in which case leave it blank.
2401
2402
2403=head3 init_platform
2404
2405 $mm->init_platform
2406
2407Initialize any macros which are for platform specific use only.
2408
2409A typical one is the version number of your OS specific module.
2410(ie. MM_Unix_VERSION or MM_VMS_VERSION).
2411
2412=cut
2413
2414sub init_platform {
2415 return '';
2416}
2417
2418
2419=head3 init_MAKE
2420
2421 $mm->init_MAKE
2422
2423Initialize MAKE from either a MAKE environment variable or $Config{make}.
2424
2425=cut
2426
2427
# spent 0s within ExtUtils::MM_Any::init_MAKE which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 649 of ExtUtils/MakeMaker.pm, avg 0s/call
sub init_MAKE {
242830s my $self = shift;
2429
243030s $self->{MAKE} ||= $ENV{MAKE} || $Config{make};
2431}
2432
2433
2434=head2 Tools
2435
2436A grab bag of methods to generate specific macros and commands.
2437
- -
2440=head3 manifypods
2441
2442Defines targets and routines to translate the pods into manpages and
2443put them into the INST_* directories.
2444
2445=cut
2446
2447
# spent 0s within ExtUtils::MM_Any::manifypods which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 0s/call
sub manifypods {
244830s my $self = shift;
2449
245030s30s my $POD2MAN_macro = $self->POD2MAN_macro();
# spent 0s making 3 calls to ExtUtils::MM_Any::POD2MAN_macro, avg 0s/call
245130s30s my $manifypods_target = $self->manifypods_target();
# spent 0s making 3 calls to ExtUtils::MM_Any::manifypods_target, avg 0s/call
2452
245330s return <<END_OF_TARGET;
2454
2455$POD2MAN_macro
2456
2457$manifypods_target
2458
2459END_OF_TARGET
2460
2461}
2462
2463
2464=head3 POD2MAN_macro
2465
2466 my $pod2man_macro = $self->POD2MAN_macro
2467
2468Returns a definition for the POD2MAN macro. This is a program
2469which emulates the pod2man utility. You can add more switches to the
2470command by simply appending them on the macro.
2471
2472Typical usage:
2473
2474 $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) podfile1 man_page1 ...
2475
2476=cut
2477
2478
# spent 0s within ExtUtils::MM_Any::POD2MAN_macro which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::manifypods at line 2450, avg 0s/call
sub POD2MAN_macro {
247930s my $self = shift;
2480
2481# Need the trailing '--' so perl stops gobbling arguments and - happens
2482# to be an alternative end of line separator on VMS so we quote it
248330s return <<'END_OF_DEF';
2484POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
2485POD2MAN = $(POD2MAN_EXE)
2486END_OF_DEF
2487}
2488
2489
2490=head3 test_via_harness
2491
2492 my $command = $mm->test_via_harness($perl, $tests);
2493
2494Returns a $command line which runs the given set of $tests with
2495Test::Harness and the given $perl.
2496
2497Used on the t/*.t files.
2498
2499=cut
2500
2501
# spent 0s within ExtUtils::MM_Any::test_via_harness which was called 2 times, avg 0s/call: # once (0s+0s) by ExtUtils::MM_Unix::test at line 3534 of ExtUtils/MM_Unix.pm # once (0s+0s) by ExtUtils::MM_Unix::test at line 3518 of ExtUtils/MM_Unix.pm
sub test_via_harness {
250220s my($self, $perl, $tests) = @_;
2503
250420s return qq{\t$perl "-MExtUtils::Command::MM" "-MTest::Harness" }.
2505 qq{"-e" "undef *Test::Harness::Switches; test_harness(\$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" $tests\n};
2506}
2507
2508=head3 test_via_script
2509
2510 my $command = $mm->test_via_script($perl, $script);
2511
2512Returns a $command line which just runs a single test without
2513Test::Harness. No checks are done on the results, they're just
2514printed.
2515
2516Used for test.pl, since they don't always follow Test::Harness
2517formatting.
2518
2519=cut
2520
2521
# spent 0s within ExtUtils::MM_Any::test_via_script which was called 6 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::test at line 3525 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::test at line 3538 of ExtUtils/MM_Unix.pm, avg 0s/call
sub test_via_script {
252260s my($self, $perl, $script) = @_;
252360s return qq{\t$perl "-I\$(INST_LIB)" "-I\$(INST_ARCHLIB)" $script\n};
2524}
2525
2526
2527=head3 tool_autosplit
2528
2529Defines a simple perl call that runs autosplit. May be deprecated by
2530pm_to_blib soon.
2531
2532=cut
2533
2534
# spent 562ms (0s+562) within ExtUtils::MM_Any::tool_autosplit which was called 3 times, avg 187ms/call: # 3 times (0s+562ms) by ExtUtils::MakeMaker::new at line 745 of ExtUtils/MakeMaker.pm, avg 187ms/call
sub tool_autosplit {
253530s my($self, %attribs) = @_;
2536
253730s my $maxlen = $attribs{MAXLEN} ? '$$AutoSplit::Maxlen=$attribs{MAXLEN};'
2538 : '';
2539
254030s3562ms my $asplit = $self->oneliner(sprintf <<'PERL_CODE', $maxlen);
# spent 562ms making 3 calls to ExtUtils::MM_Win32::oneliner, avg 187ms/call
2541use AutoSplit; %s autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)
2542PERL_CODE
2543
254430s return sprintf <<'MAKE_FRAG', $asplit;
2545# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
2546AUTOSPLITFILE = %s
2547
2548MAKE_FRAG
2549
2550}
2551
2552
2553=head3 arch_check
2554
2555 my $arch_ok = $mm->arch_check(
2556 $INC{"Config.pm"},
2557 File::Spec->catfile($Config{archlibexp}, "Config.pm")
2558 );
2559
2560A sanity check that what Perl thinks the architecture is and what
2561Config thinks the architecture is are the same. If they're not it
2562will return false and show a diagnostic message.
2563
2564When building Perl it will always return true, as nothing is installed
2565yet.
2566
2567The interface is a bit odd because this is the result of a
2568quick refactoring. Don't rely on it.
2569
2570=cut
2571
2572
# spent 0s within ExtUtils::MM_Any::arch_check which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Win32::arch_check at line 486 of ExtUtils/MM_Win32.pm, avg 0s/call
sub arch_check {
257330s my $self = shift;
257430s my($pconfig, $cconfig) = @_;
2575
257630s return 1 if $self->{PERL_SRC};
2577
257830s30s my($pvol, $pthinks) = $self->splitpath($pconfig);
# spent 0s making 3 calls to File::Spec::Win32::splitpath, avg 0s/call
257930s30s my($cvol, $cthinks) = $self->splitpath($cconfig);
# spent 0s making 3 calls to File::Spec::Win32::splitpath, avg 0s/call
2580
258130s30s $pthinks = $self->canonpath($pthinks);
# spent 0s making 3 calls to File::Spec::Win32::canonpath, avg 0s/call
258230s30s $cthinks = $self->canonpath($cthinks);
# spent 0s making 3 calls to File::Spec::Win32::canonpath, avg 0s/call
2583
258430s my $ret = 1;
258530s if ($pthinks ne $cthinks) {
2586 print "Have $pthinks\n";
2587 print "Want $cthinks\n";
2588
2589 $ret = 0;
2590
2591 my $arch = (grep length, $self->splitdir($pthinks))[-1];
2592
2593 print <<END unless $self->{UNINSTALLED_PERL};
2594Your perl and your Config.pm seem to have different ideas about the
2595architecture they are running on.
2596Perl thinks: [$arch]
2597Config says: [$Config{archname}]
2598This may or may not cause problems. Please check your installation of perl
2599if you have problems building this extension.
2600END
2601 }
2602
260330s return $ret;
2604}
2605
- -
2608=head2 File::Spec wrappers
2609
2610ExtUtils::MM_Any is a subclass of File::Spec. The methods noted here
2611override File::Spec.
2612
- -
2615=head3 catfile
2616
2617File::Spec <= 0.83 has a bug where the file part of catfile is not
2618canonicalized. This override fixes that bug.
2619
2620=cut
2621
2622
# spent 15.6ms (0s+15.6) within ExtUtils::MM_Any::catfile which was called 83 times, avg 188µs/call: # 24 times (0s+0s) by ExtUtils::MM_Unix::init_main at line 1644 of ExtUtils/MM_Unix.pm, avg 0s/call # 12 times (0s+0s) by ExtUtils::MM_Unix::tool_xsubpp at line 3590 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+15.6ms) by ExtUtils::MM_Unix::init_xs at line 2072 of ExtUtils/MM_Unix.pm, avg 5.20ms/call # 3 times (0s+0s) by ExtUtils::MM_Unix::install at line 2224 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_main at line 1696 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::install at line 2188 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::tool_xsubpp at line 3598 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::staticmake at line 3389 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_main at line 1778 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_xs at line 2074 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_xs at line 2076 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1315 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::clean at line 692, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::clean at line 693, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 665 of ExtUtils/MakeMaker.pm, avg 0s/call # 2 times (0s+0s) by ExtUtils::MM_Unix::install at line 2124 of ExtUtils/MM_Unix.pm, avg 0s/call # 2 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1318 of ExtUtils/MM_Unix.pm, avg 0s/call # 2 times (0s+0s) by ExtUtils::MM_Unix::install at line 2161 of ExtUtils/MM_Unix.pm, avg 0s/call # 2 times (0s+0s) by ExtUtils::MM_Unix::install at line 2143 of ExtUtils/MM_Unix.pm, avg 0s/call
sub catfile {
2623830s my $self = shift;
2624830s16615.6ms return $self->canonpath($self->SUPER::catfile(@_));
# spent 15.6ms making 83 calls to File::Spec::Win32::catfile, avg 188µs/call # spent 0s making 83 calls to File::Spec::Win32::canonpath, avg 0s/call
2625}
2626
- -
2629=head2 Misc
2630
2631Methods I can't really figure out where they should go yet.
2632
2633
2634=head3 find_tests
2635
2636 my $test = $mm->find_tests;
2637
2638Returns a string suitable for feeding to the shell to return all
2639tests in t/*.t.
2640
2641=cut
2642
2643
# spent 0s within ExtUtils::MM_Any::find_tests which was called: # once (0s+0s) by ExtUtils::MM_Unix::test at line 3477 of ExtUtils/MM_Unix.pm
sub find_tests {
264410s my($self) = shift;
264510s10s return -d 't' ? 't/*.t' : '';
# spent 0s making 1 call to ExtUtils::MM_Any::CORE:ftdir
2646}
2647
2648=head3 find_tests_recursive
2649
2650 my $tests = $mm->find_tests_recursive;
2651
2652Returns a string suitable for feeding to the shell to return all
2653tests in t/ but recursively.
2654
2655=cut
2656
2657sub find_tests_recursive {
2658 my($self) = shift;
2659 return '' unless -d 't';
2660
2661 require File::Find;
2662
2663 my %testfiles;
2664
2665 my $wanted = sub {
2666 return unless m!\.t$!;
2667 my ($volume,$directories,$file) =
2668 File::Spec->splitpath( $File::Find::name );
2669 my @dirs = File::Spec->splitdir( $directories );
2670 for ( @dirs ) {
2671 next if $_ eq 't';
2672 unless ( $_ ) {
2673 $_ = '*.t';
2674 next;
2675 }
2676 $_ = '*';
2677 }
2678 my $testfile = join '/', @dirs;
2679 $testfiles{ $testfile } = 1;
2680 };
2681
2682 File::Find::find( $wanted, 't' );
2683
2684 return join ' ', sort keys %testfiles;
2685}
2686
2687=head3 extra_clean_files
2688
2689 my @files_to_clean = $MM->extra_clean_files;
2690
2691Returns a list of OS specific files to be removed in the clean target in
2692addition to the usual set.
2693
2694=cut
2695
2696# An empty method here tickled a perl 5.8.1 bug and would return its object.
2697sub extra_clean_files {
2698 return;
2699}
2700
2701
2702=head3 installvars
2703
2704 my @installvars = $mm->installvars;
2705
2706A list of all the INSTALL* variables without the INSTALL prefix. Useful
2707for iteration or building related variable sets.
2708
2709=cut
2710
2711
# spent 0s within ExtUtils::MM_Any::installvars which was called 6 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::constants at line 392 of ExtUtils/MM_Unix.pm, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Unix::init_DEST at line 535 of ExtUtils/MM_Unix.pm, avg 0s/call
sub installvars {
271260s return qw(PRIVLIB SITELIB VENDORLIB
2713 ARCHLIB SITEARCH VENDORARCH
2714 BIN SITEBIN VENDORBIN
2715 SCRIPT SITESCRIPT VENDORSCRIPT
2716 MAN1DIR SITEMAN1DIR VENDORMAN1DIR
2717 MAN3DIR SITEMAN3DIR VENDORMAN3DIR
2718 );
2719}
2720
2721
2722=head3 libscan
2723
2724 my $wanted = $self->libscan($path);
2725
2726Takes a path to a file or dir and returns an empty string if we don't
2727want to include this file in the library. Otherwise it returns the
2728the $path unchanged.
2729
2730Mainly used to exclude version control administrative directories from
2731installation.
2732
2733=cut
2734
2735
# spent 0s within ExtUtils::MM_Any::libscan which was called 15 times, avg 0s/call: # 15 times (0s+0s) by ExtUtils::MM_Unix::init_dirscan at line 1314 of ExtUtils/MM_Unix.pm, avg 0s/call
sub libscan {
2736150s my($self,$path) = @_;
2737150s150s my($dirs,$file) = ($self->splitpath($path))[1,2];
# spent 0s making 15 calls to File::Spec::Win32::splitpath, avg 0s/call
2738150s300s return '' if grep /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/,
# spent 0s making 15 calls to ExtUtils::MM_Any::CORE:match, avg 0s/call # spent 0s making 15 calls to File::Spec::Win32::splitdir, avg 0s/call
2739 $self->splitdir($dirs), $file;
2740
2741150s return $path;
2742}
2743
2744
2745=head3 platform_constants
2746
2747 my $make_frag = $mm->platform_constants
2748
2749Returns a make fragment defining all the macros initialized in
2750init_platform() rather than put them in constants().
2751
2752=cut
2753
2754sub platform_constants {
2755 return '';
2756}
2757
2758=begin private
2759
2760=head3 _PREREQ_PRINT
2761
2762 $self->_PREREQ_PRINT;
2763
2764Implements PREREQ_PRINT.
2765
2766Refactored out of MakeMaker->new().
2767
2768=end private
2769
2770=cut
2771
2772sub _PREREQ_PRINT {
2773 my $self = shift;
2774
2775 require Data::Dumper;
2776 my @what = ('PREREQ_PM');
2777 push @what, 'MIN_PERL_VERSION' if $self->{MIN_PERL_VERSION};
2778 push @what, 'BUILD_REQUIRES' if $self->{BUILD_REQUIRES};
2779 print Data::Dumper->Dump([@{$self}{@what}], \@what);
2780 exit 0;
2781}
2782
2783
2784=begin private
2785
2786=head3 _PRINT_PREREQ
2787
2788 $mm->_PRINT_PREREQ;
2789
2790Implements PRINT_PREREQ, a slightly different version of PREREQ_PRINT
2791added by Redhat to, I think, support generating RPMs from Perl modules.
2792
2793Should not include BUILD_REQUIRES as RPMs do not incluide them.
2794
2795Refactored out of MakeMaker->new().
2796
2797=end private
2798
2799=cut
2800
2801sub _PRINT_PREREQ {
2802 my $self = shift;
2803
2804 my $prereqs= $self->{PREREQ_PM};
2805 my @prereq = map { [$_, $prereqs->{$_}] } keys %$prereqs;
2806
2807 if ( $self->{MIN_PERL_VERSION} ) {
2808 push @prereq, ['perl' => $self->{MIN_PERL_VERSION}];
2809 }
2810
2811 print join(" ", map { "perl($_->[0])>=$_->[1] " }
2812 sort { $a->[0] cmp $b->[0] } @prereq), "\n";
2813 exit 0;
2814}
2815
2816
2817=begin private
2818
2819=head3 _all_prereqs
2820
2821 my $prereqs = $self->_all_prereqs;
2822
2823Returns a hash ref of both PREREQ_PM and BUILD_REQUIRES.
2824
2825=end private
2826
2827=cut
2828
2829
# spent 0s within ExtUtils::MM_Any::_all_prereqs which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MakeMaker::new at line 498 of ExtUtils/MakeMaker.pm, avg 0s/call
sub _all_prereqs {
283030s my $self = shift;
2831
283230s return { %{$self->{PREREQ_PM}}, %{$self->{BUILD_REQUIRES}} };
2833}
2834
2835=begin private
2836
2837=head3 _perl_header_files
2838
2839 my $perl_header_files= $self->_perl_header_files;
2840
2841returns a sorted list of header files as found in PERL_SRC or $archlibexp/CORE.
2842
2843Used by perldepend() in MM_Unix and MM_VMS via _perl_header_files_fragment()
2844
2845=end private
2846
2847=cut
2848
2849
# spent 0s within ExtUtils::MM_Any::_perl_header_files which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::_perl_header_files_fragment at line 2889, avg 0s/call
sub _perl_header_files {
285030s my $self = shift;
2851
285230s30s my $header_dir = $self->{PERL_SRC} || $ENV{PERL_SRC} || $self->catdir($Config{archlibexp}, 'CORE');
# spent 0s making 3 calls to File::Spec::Win32::catdir, avg 0s/call
285330s30s opendir my $dh, $header_dir
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:open_dir, avg 0s/call
2854 or die "Failed to opendir '$header_dir' to find header files: $!";
2855
2856 # we need to use a temporary here as the sort in scalar context would have undefined results.
28572580s2610s my @perl_headers= sort grep { /\.h\z/ } readdir($dh);
# spent 0s making 255 calls to ExtUtils::MM_Any::CORE:match, avg 0s/call # spent 0s making 3 calls to ExtUtils::MM_Any::CORE:readdir, avg 0s/call # spent 0s making 3 calls to ExtUtils::MM_Any::CORE:sort, avg 0s/call
2858
285930s30s closedir $dh;
# spent 0s making 3 calls to ExtUtils::MM_Any::CORE:closedir, avg 0s/call
2860
286130s return @perl_headers;
2862}
2863
2864=begin private
2865
2866=head3 _perl_header_files_fragment ($o, $separator)
2867
2868 my $perl_header_files_fragment= $self->_perl_header_files_fragment("/");
2869
2870return a Makefile fragment which holds the list of perl header files which
2871XS code depends on $(PERL_INC), and sets up the dependency for the $(OBJECT) file.
2872
2873The $separator argument defaults to "". MM_VMS will set it to "" and MM_UNIX to "/"
2874in perldepend(). This reason child subclasses need to control this is that in
2875VMS the $(PERL_INC) directory will already have delimiters in it, but in
2876UNIX $(PERL_INC) will need a slash between it an the filename. Hypothetically
2877win32 could use "\\" (but it doesn't need to).
2878
2879=end private
2880
2881=cut
2882
2883
# spent 0s within ExtUtils::MM_Any::_perl_header_files_fragment which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Unix::perldepend at line 2883 of ExtUtils/MM_Unix.pm, avg 0s/call
sub _perl_header_files_fragment {
288430s my ($self, $separator)= @_;
288530s $separator ||= "";
28862400s return join("\\\n",
2887 "PERL_HDRS = ",
2888 map {
288930s30s sprintf( " \$(PERL_INCDEP)%s%s ", $separator, $_ )
# spent 0s making 3 calls to ExtUtils::MM_Any::_perl_header_files, avg 0s/call
2890 } $self->_perl_header_files()
2891 ) . "\n\n"
2892 . "\$(OBJECT) : \$(PERL_HDRS)\n";
2893}
2894
2895
2896=head1 AUTHOR
2897
2898Michael G Schwern <schwern@pobox.com> and the denizens of
2899makemaker@perl.org with code from ExtUtils::MM_Unix and
2900ExtUtils::MM_Win32.
2901
2902
2903=cut
2904
290510s1;
 
# spent 61.7s within ExtUtils::MM_Any::CORE:backtick which was called 333 times, avg 185ms/call: # 333 times (61.7s+0s) by ExtUtils::MM_Any::is_make_type at line 213, avg 185ms/call
sub ExtUtils::MM_Any::CORE:backtick; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:closedir which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::_perl_header_files at line 2859, avg 0s/call
sub ExtUtils::MM_Any::CORE:closedir; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:ftdir which was called: # once (0s+0s) by ExtUtils::MM_Any::find_tests at line 2645
sub ExtUtils::MM_Any::CORE:ftdir; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:ftfile which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::init_others at line 2295, avg 0s/call
sub ExtUtils::MM_Any::CORE:ftfile; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:ftis which was called 8 times, avg 0s/call: # 8 times (0s+0s) by ExtUtils::MM_Any::_mymeta_from_meta at line 1488, avg 0s/call
sub ExtUtils::MM_Any::CORE:ftis; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:match which was called 970 times, avg 0s/call: # 336 times (0s+0s) by ExtUtils::MM_Any::is_make_type at line 208, avg 0s/call # 333 times (0s+0s) by ExtUtils::MM_Any::is_make_type at line 209, avg 0s/call # 255 times (0s+0s) by ExtUtils::MM_Any::_perl_header_files at line 2857, avg 0s/call # 15 times (0s+0s) by ExtUtils::MM_Any::libscan at line 2738, avg 0s/call # 13 times (0s+0s) by ExtUtils::MM_Any::quote_dep at line 256, avg 0s/call # 5 times (0s+0s) by ExtUtils::MM_Any::metafile_data at line 1139, avg 0s/call # 5 times (0s+0s) by ExtUtils::MM_Any::_normalize_version at line 1246, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::_fix_metadata_before_conversion at line 1040, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::init_VERSION at line 2121, avg 0s/call # once (0s+0s) by ExtUtils::MM_Any::_mymeta_from_meta at line 1499 # once (0s+0s) by ExtUtils::MM_Any::init_ABSTRACT at line 1735
sub ExtUtils::MM_Any::CORE:match; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:open_dir which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::_perl_header_files at line 2853, avg 0s/call
sub ExtUtils::MM_Any::CORE:open_dir; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:readdir which was called 3 times, avg 0s/call: # 3 times (0s+0s) by ExtUtils::MM_Any::_perl_header_files at line 2857, avg 0s/call
sub ExtUtils::MM_Any::CORE:readdir; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:regcomp which was called 336 times, avg 0s/call: # 336 times (0s+0s) by ExtUtils::MM_Any::is_make_type at line 208, avg 0s/call
sub ExtUtils::MM_Any::CORE:regcomp; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:sort which was called 24 times, avg 0s/call: # 6 times (0s+0s) by ExtUtils::MM_Any::manifypods_target at line 924, avg 0s/call # 6 times (0s+0s) by ExtUtils::MM_Any::manifypods_target at line 910, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::clean at line 659, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::_perl_header_files at line 2857, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::clean at line 711, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::clean at line 710, avg 0s/call
sub ExtUtils::MM_Any::CORE:sort; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:subst which was called 1679 times, avg 0s/call: # 672 times (0s+0s) by ExtUtils::MM_Any::make at line 571, avg 0s/call # 672 times (0s+0s) by ExtUtils::MM_Any::make at line 574, avg 0s/call # 210 times (0s+0s) by ExtUtils::MM_Any::escape_all_dollarsigns at line 532, avg 0s/call # 82 times (0s+0s) by ExtUtils::MM_Any::escape_dollarsigns at line 514, avg 0s/call # 15 times (0s+0s) by ExtUtils::MM_Any::_expand_macros at line 335, avg 0s/call # 13 times (0s+0s) by ExtUtils::MM_Any::quote_dep at line 260, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::init_VERSION at line 2126, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::init_others at line 2272, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::init_VERSION at line 2135, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::init_VERSION at line 2127, avg 0s/call # 3 times (0s+0s) by ExtUtils::MM_Any::init_others at line 2293, avg 0s/call
sub ExtUtils::MM_Any::CORE:subst; # opcode
# spent 0s within ExtUtils::MM_Any::CORE:substcont which was called 30 times, avg 0s/call: # 30 times (0s+0s) by ExtUtils::MM_Any::_expand_macros at line 335, avg 0s/call
sub ExtUtils::MM_Any::CORE:substcont; # opcode