Install Perl 5.8.8
[msysgit.git] / mingw / html / lib / ExtUtils / MM_Any.html
blob39ebdcb9ebc9a57f4784334d80800096c9e9c61f
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>ExtUtils::MM_Any - Platform-agnostic MM methods</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;ExtUtils::MM_Any - Platform-agnostic MM methods</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#synopsis">SYNOPSIS</a></li>
24 <li><a href="#description">DESCRIPTION</a></li>
25 <li><a href="#methods">METHODS</a></li>
26 <ul>
28 <li><a href="#crossplatform_helper_methods">Cross-platform helper methods</a></li>
29 <ul>
31 <li><a href="#os_flavor_abstract">os_flavor <em>Abstract</em></a></li>
32 <li><a href="#os_flavor_is">os_flavor_is</a></li>
33 <li><a href="#split_command">split_command</a></li>
34 <li><a href="#echo">echo</a></li>
35 <li><a href="#wraplist">wraplist</a></li>
36 <li><a href="#cd_abstract">cd <em>Abstract</em></a></li>
37 <li><a href="#oneliner_abstract">oneliner <em>Abstract</em></a></li>
38 <li><a href="#quote_literal_abstract">quote_literal <em>Abstract</em></a></li>
39 <li><a href="#escape_newlines_abstract">escape_newlines <em>Abstract</em></a></li>
40 <li><a href="#max_exec_len_abstract">max_exec_len <em>Abstract</em></a></li>
41 </ul>
43 <li><a href="#targets">Targets</a></li>
44 <ul>
46 <li><a href="#all_target">all_target</a></li>
47 <li><a href="#blibdirs_target">blibdirs_target</a></li>
48 <li><a href="#clean__o_">clean (o)</a></li>
49 <li><a href="#clean_subdirs_target">clean_subdirs_target</a></li>
50 <li><a href="#dir_target">dir_target</a></li>
51 <li><a href="#distdir">distdir</a></li>
52 <li><a href="#dist_test">dist_test</a></li>
53 <li><a href="#dynamic__o_">dynamic (o)</a></li>
54 <li><a href="#makemakerdflt_target">makemakerdflt_target</a></li>
55 <li><a href="#manifypods_target">manifypods_target</a></li>
56 <li><a href="#metafile_target">metafile_target</a></li>
57 <li><a href="#distmeta_target">distmeta_target</a></li>
58 <li><a href="#realclean__o_">realclean (o)</a></li>
59 <li><a href="#realclean_subdirs_target">realclean_subdirs_target</a></li>
60 <li><a href="#signature_target">signature_target</a></li>
61 <li><a href="#distsignature_target">distsignature_target</a></li>
62 <li><a href="#special_targets">special_targets</a></li>
63 </ul>
65 <li><a href="#init_methods">Init methods</a></li>
66 <ul>
68 <li><a href="#init_inst">init_INST</a></li>
69 <li><a href="#init_install">init_INSTALL</a></li>
70 <li><a href="#init_install_from_prefix">init_INSTALL_from_PREFIX</a></li>
71 <li><a href="#init_from_installbase">init_from_INSTALLBASE</a></li>
72 <li><a href="#init_version_abstract">init_VERSION <em>Abstract</em></a></li>
73 <li><a href="#init_others_abstract">init_others <em>Abstract</em></a></li>
74 <li><a href="#init_dirfilesep_abstract">init_DIRFILESEP <em>Abstract</em></a></li>
75 <li><a href="#init_linker_abstract">init_linker <em>Abstract</em></a></li>
76 <li><a href="#init_platform">init_platform</a></li>
77 </ul>
79 <li><a href="#tools">Tools</a></li>
80 <ul>
82 <li><a href="#manifypods">manifypods</a></li>
83 <li><a href="#pod2man_macro">POD2MAN_macro</a></li>
84 <li><a href="#test_via_harness">test_via_harness</a></li>
85 <li><a href="#test_via_script">test_via_script</a></li>
86 <li><a href="#tool_autosplit">tool_autosplit</a></li>
87 </ul>
89 <li><a href="#file__spec_wrappers">File::Spec wrappers</a></li>
90 <ul>
92 <li><a href="#catfile">catfile</a></li>
93 </ul>
95 <li><a href="#misc">Misc</a></li>
96 <ul>
98 <li><a href="#find_tests">find_tests</a></li>
99 <li><a href="#extra_clean_files">extra_clean_files</a></li>
100 <li><a href="#installvars">installvars</a></li>
101 <li><a href="#libscan">libscan</a></li>
102 <li><a href="#platform_constants">platform_constants</a></li>
103 </ul>
105 </ul>
107 <li><a href="#author">AUTHOR</a></li>
108 </ul>
109 <!-- INDEX END -->
111 <hr />
113 </p>
114 <h1><a name="name">NAME</a></h1>
115 <p>ExtUtils::MM_Any - Platform-agnostic MM methods</p>
117 </p>
118 <hr />
119 <h1><a name="synopsis">SYNOPSIS</a></h1>
120 <pre>
121 FOR INTERNAL USE ONLY!</pre>
122 <pre>
123 package ExtUtils::MM_SomeOS;</pre>
124 <pre>
125 # Temporarily, you have to subclass both. Put MM_Any first.
126 require ExtUtils::MM_Any;
127 require ExtUtils::MM_Unix;
128 @ISA = qw(ExtUtils::MM_Any ExtUtils::Unix);</pre>
130 </p>
131 <hr />
132 <h1><a name="description">DESCRIPTION</a></h1>
133 <p><strong>FOR INTERNAL USE ONLY!</strong></p>
134 <p>ExtUtils::MM_Any is a superclass for the ExtUtils::MM_* set of
135 modules. It contains methods which are either inherently
136 cross-platform or are written in a cross-platform manner.</p>
137 <p>Subclass off of ExtUtils::MM_Any <em>and</em> ExtUtils::MM_Unix. This is a
138 temporary solution.</p>
139 <p><strong>THIS MAY BE TEMPORARY!</strong></p>
141 </p>
142 <hr />
143 <h1><a name="methods">METHODS</a></h1>
144 <p>Any methods marked <em>Abstract</em> must be implemented by subclasses.</p>
146 </p>
147 <h2><a name="crossplatform_helper_methods">Cross-platform helper methods</a></h2>
148 <p>These are methods which help writing cross-platform code.</p>
150 </p>
151 <h3><a name="os_flavor_abstract">os_flavor <em>Abstract</em></a></h3>
152 <pre>
153 my @os_flavor = $mm-&gt;os_flavor;</pre>
154 <p>@os_flavor is the style of operating system this is, usually
155 corresponding to the MM_*.pm file we're using.</p>
156 <p>The first element of @os_flavor is the major family (ie. Unix,
157 Windows, VMS, OS/2, etc...) and the rest are sub families.</p>
158 <p>Some examples:</p>
159 <pre>
160 Cygwin98 ('Unix', 'Cygwin', 'Cygwin9x')
161 Windows NT ('Win32', 'WinNT')
162 Win98 ('Win32', 'Win9x')
163 Linux ('Unix', 'Linux')
164 MacOS X ('Unix', 'Darwin', 'MacOS', 'MacOS X')
165 OS/2 ('OS/2')</pre>
166 <p>This is used to write code for styles of operating system.
167 See <code>os_flavor_is()</code> for use.</p>
169 </p>
170 <h3><a name="os_flavor_is">os_flavor_is</a></h3>
171 <pre>
172 my $is_this_flavor = $mm-&gt;os_flavor_is($this_flavor);
173 my $is_this_flavor = $mm-&gt;os_flavor_is(@one_of_these_flavors);</pre>
174 <p>Checks to see if the current operating system is one of the given flavors.</p>
175 <p>This is useful for code like:</p>
176 <pre>
177 if( $mm-&gt;os_flavor_is('Unix') ) {
178 $out = `foo 2&gt;&amp;1`;
180 else {
181 $out = `foo`;
182 }</pre>
184 </p>
185 <h3><a name="split_command">split_command</a></h3>
186 <pre>
187 my @cmds = $MM-&gt;split_command($cmd, @args);</pre>
188 <p>Most OS have a maximum command length they can execute at once. Large
189 modules can easily generate commands well past that limit. Its
190 necessary to split long commands up into a series of shorter commands.</p>
191 <p><code>split_command</code> will return a series of @cmds each processing part of
192 the args. Collectively they will process all the arguments. Each
193 individual line in @cmds will not be longer than the
194 $self-&gt;max_exec_len being careful to take into account macro expansion.</p>
195 <p>$cmd should include any switches and repeated initial arguments.</p>
196 <p>If no @args are given, no @cmds will be returned.</p>
197 <p>Pairs of arguments will always be preserved in a single command, this
198 is a heuristic for things like pm_to_blib and pod2man which work on
199 pairs of arguments. This makes things like this safe:</p>
200 <pre>
201 $self-&gt;split_command($cmd, %pod2man);</pre>
203 </p>
204 <h3><a name="echo">echo</a></h3>
205 <pre>
206 my @commands = $MM-&gt;echo($text);
207 my @commands = $MM-&gt;echo($text, $file);
208 my @commands = $MM-&gt;echo($text, $file, $appending);</pre>
209 <p>Generates a set of @commands which print the $text to a $file.</p>
210 <p>If $file is not given, output goes to STDOUT.</p>
211 <p>If $appending is true the $file will be appended to rather than
212 overwritten.</p>
214 </p>
215 <h3><a name="wraplist">wraplist</a></h3>
216 <pre>
217 my $args = $mm-&gt;wraplist(@list);</pre>
218 <p>Takes an array of items and turns them into a well-formatted list of
219 arguments. In most cases this is simply something like:</p>
220 <pre>
221 FOO \
222 BAR \
223 BAZ</pre>
225 </p>
226 <h3><a name="cd_abstract">cd <em>Abstract</em></a></h3>
227 <pre>
228 my $subdir_cmd = $MM-&gt;cd($subdir, @cmds);</pre>
229 <p>This will generate a make fragment which runs the @cmds in the given
230 $dir. The rough equivalent to this, except cross platform.</p>
231 <pre>
232 cd $subdir &amp;&amp; $cmd</pre>
233 <p>Currently $dir can only go down one level. ``foo'' is fine. ``foo/bar'' is
234 not. ``../foo'' is right out.</p>
235 <p>The resulting $subdir_cmd has no leading tab nor trailing newline. This
236 makes it easier to embed in a make string. For example.</p>
237 <pre>
238 my $make = sprintf &lt;&lt;'CODE', $subdir_cmd;
239 foo :
240 $(ECHO) what
242 $(ECHO) mouche
243 CODE</pre>
245 </p>
246 <h3><a name="oneliner_abstract">oneliner <em>Abstract</em></a></h3>
247 <pre>
248 my $oneliner = $MM-&gt;oneliner($perl_code);
249 my $oneliner = $MM-&gt;oneliner($perl_code, \@switches);</pre>
250 <p>This will generate a perl one-liner safe for the particular platform
251 you're on based on the given $perl_code and @switches (a -e is
252 assumed) suitable for using in a make target. It will use the proper
253 shell quoting and escapes.</p>
254 <p>$(PERLRUN) will be used as perl.</p>
255 <p>Any newlines in $perl_code will be escaped. Leading and trailing
256 newlines will be stripped. Makes this idiom much easier:</p>
257 <pre>
258 my $code = $MM-&gt;oneliner(&lt;&lt;'CODE', [...switches...]);
259 some code here
260 another line here
261 CODE</pre>
262 <p>Usage might be something like:</p>
263 <pre>
264 # an echo emulation
265 $oneliner = $MM-&gt;oneliner('print &quot;Foo\n&quot;');
266 $make = '$oneliner &gt; somefile';</pre>
267 <p>All dollar signs must be doubled in the $perl_code if you expect them
268 to be interpreted normally, otherwise it will be considered a make
269 macro. Also remember to quote make macros else it might be used as a
270 bareword. For example:</p>
271 <pre>
272 # Assign the value of the $(VERSION_FROM) make macro to $vf.
273 $oneliner = $MM-&gt;oneliner('$$vf = &quot;$(VERSION_FROM)&quot;');</pre>
274 <p>Its currently very simple and may be expanded sometime in the figure
275 to include more flexible code and switches.</p>
277 </p>
278 <h3><a name="quote_literal_abstract">quote_literal <em>Abstract</em></a></h3>
279 <pre>
280 my $safe_text = $MM-&gt;quote_literal($text);</pre>
281 <p>This will quote $text so it is interpreted literally in the shell.</p>
282 <p>For example, on Unix this would escape any single-quotes in $text and
283 put single-quotes around the whole thing.</p>
285 </p>
286 <h3><a name="escape_newlines_abstract">escape_newlines <em>Abstract</em></a></h3>
287 <pre>
288 my $escaped_text = $MM-&gt;escape_newlines($text);</pre>
289 <p>Shell escapes newlines in $text.</p>
291 </p>
292 <h3><a name="max_exec_len_abstract">max_exec_len <em>Abstract</em></a></h3>
293 <pre>
294 my $max_exec_len = $MM-&gt;max_exec_len;</pre>
295 <p>Calculates the maximum command size the OS can exec. Effectively,
296 this is the max size of a shell command line.</p>
298 </p>
299 <h2><a name="targets">Targets</a></h2>
300 <p>These are methods which produce make targets.</p>
302 </p>
303 <h3><a name="all_target">all_target</a></h3>
304 <p>Generate the default target 'all'.</p>
306 </p>
307 <h3><a name="blibdirs_target">blibdirs_target</a></h3>
308 <pre>
309 my $make_frag = $mm-&gt;blibdirs_target;</pre>
310 <p>Creates the blibdirs target which creates all the directories we use
311 in blib/.</p>
312 <p>The blibdirs.ts target is deprecated. Depend on blibdirs instead.</p>
314 </p>
315 <h3><a name="clean__o_">clean (o)</a></h3>
316 <p>Defines the clean target.</p>
318 </p>
319 <h3><a name="clean_subdirs_target">clean_subdirs_target</a></h3>
320 <pre>
321 my $make_frag = $MM-&gt;clean_subdirs_target;</pre>
322 <p>Returns the clean_subdirs target. This is used by the clean target to
323 call clean on any subdirectories which contain Makefiles.</p>
325 </p>
326 <h3><a name="dir_target">dir_target</a></h3>
327 <pre>
328 my $make_frag = $mm-&gt;dir_target(@directories);</pre>
329 <p>Generates targets to create the specified directories and set its
330 permission to 0755.</p>
331 <p>Because depending on a directory to just ensure it exists doesn't work
332 too well (the modified time changes too often) <code>dir_target()</code> creates a
333 .exists file in the created directory. It is this you should depend on.
334 For portability purposes you should use the $(DIRFILESEP) macro rather
335 than a '/' to seperate the directory from the file.</p>
336 <pre>
337 yourdirectory$(DIRFILESEP).exists</pre>
339 </p>
340 <h3><a name="distdir">distdir</a></h3>
341 <p>Defines the scratch directory target that will hold the distribution
342 before tar-ing (or shar-ing).</p>
344 </p>
345 <h3><a name="dist_test">dist_test</a></h3>
346 <p>Defines a target that produces the distribution in the
347 scratchdirectory, and runs 'perl Makefile.PL; make ;make test' in that
348 subdirectory.</p>
350 </p>
351 <h3><a name="dynamic__o_">dynamic (o)</a></h3>
352 <p>Defines the dynamic target.</p>
354 </p>
355 <h3><a name="makemakerdflt_target">makemakerdflt_target</a></h3>
356 <pre>
357 my $make_frag = $mm-&gt;makemakerdflt_target</pre>
358 <p>Returns a make fragment with the makemakerdeflt_target specified.
359 This target is the first target in the Makefile, is the default target
360 and simply points off to 'all' just in case any make variant gets
361 confused or something gets snuck in before the real 'all' target.</p>
363 </p>
364 <h3><a name="manifypods_target">manifypods_target</a></h3>
365 <pre>
366 my $manifypods_target = $self-&gt;manifypods_target;</pre>
367 <p>Generates the manifypods target. This target generates man pages from
368 all POD files in MAN1PODS and MAN3PODS.</p>
370 </p>
371 <h3><a name="metafile_target">metafile_target</a></h3>
372 <pre>
373 my $target = $mm-&gt;metafile_target;</pre>
374 <p>Generate the metafile target.</p>
375 <p>Writes the file META.yml YAML encoded meta-data about the module in
376 the distdir. The format follows Module::Build's as closely as
377 possible. Additionally, we include:</p>
378 <pre>
379 version_from
380 installdirs</pre>
382 </p>
383 <h3><a name="distmeta_target">distmeta_target</a></h3>
384 <pre>
385 my $make_frag = $mm-&gt;distmeta_target;</pre>
386 <p>Generates the distmeta target to add META.yml to the MANIFEST in the
387 distdir.</p>
389 </p>
390 <h3><a name="realclean__o_">realclean (o)</a></h3>
391 <p>Defines the realclean target.</p>
393 </p>
394 <h3><a name="realclean_subdirs_target">realclean_subdirs_target</a></h3>
395 <pre>
396 my $make_frag = $MM-&gt;realclean_subdirs_target;</pre>
397 <p>Returns the realclean_subdirs target. This is used by the realclean
398 target to call realclean on any subdirectories which contain Makefiles.</p>
400 </p>
401 <h3><a name="signature_target">signature_target</a></h3>
402 <pre>
403 my $target = $mm-&gt;signature_target;</pre>
404 <p>Generate the signature target.</p>
405 <p>Writes the file SIGNATURE with ``cpansign -s''.</p>
407 </p>
408 <h3><a name="distsignature_target">distsignature_target</a></h3>
409 <pre>
410 my $make_frag = $mm-&gt;distsignature_target;</pre>
411 <p>Generates the distsignature target to add SIGNATURE to the MANIFEST in the
412 distdir.</p>
414 </p>
415 <h3><a name="special_targets">special_targets</a></h3>
416 <pre>
417 my $make_frag = $mm-&gt;special_targets</pre>
418 <p>Returns a make fragment containing any targets which have special
419 meaning to make. For example, .SUFFIXES and .PHONY.</p>
421 </p>
422 <h2><a name="init_methods">Init methods</a></h2>
423 <p>Methods which help initialize the MakeMaker object and macros.</p>
425 </p>
426 <h3><a name="init_inst">init_INST</a></h3>
427 <pre>
428 $mm-&gt;init_INST;</pre>
429 <p>Called by init_main. Sets up all INST_* variables except those related
430 to XS code. Those are handled in init_xs.</p>
432 </p>
433 <h3><a name="init_install">init_INSTALL</a></h3>
434 <pre>
435 $mm-&gt;init_INSTALL;</pre>
436 <p>Called by init_main. Sets up all INSTALL_* variables (except
437 INSTALLDIRS) and *PREFIX.</p>
439 </p>
440 <h3><a name="init_install_from_prefix">init_INSTALL_from_PREFIX</a></h3>
441 <pre>
442 $mm-&gt;init_INSTALL_from_PREFIX;</pre>
444 </p>
445 <h3><a name="init_from_installbase">init_from_INSTALLBASE</a></h3>
446 <pre>
447 $mm-&gt;init_from_INSTALLBASE</pre>
449 </p>
450 <h3><a name="init_version_abstract">init_VERSION <em>Abstract</em></a></h3>
451 <pre>
452 $mm-&gt;init_VERSION</pre>
453 <p>Initialize macros representing versions of MakeMaker and other tools</p>
454 <p>MAKEMAKER: path to the MakeMaker module.</p>
455 <p>MM_VERSION: ExtUtils::MakeMaker Version</p>
456 <p>MM_REVISION: ExtUtils::MakeMaker version control revision (for backwards
457 compat)</p>
458 <p>VERSION: version of your module</p>
459 <p>VERSION_MACRO: which macro represents the version (usually 'VERSION')</p>
460 <p>VERSION_SYM: like version but safe for use as an RCS revision number</p>
461 <p>DEFINE_VERSION: -D line to set the module version when compiling</p>
462 <p>XS_VERSION: version in your .xs file. Defaults to $(VERSION)</p>
463 <p>XS_VERSION_MACRO: which macro represents the XS version.</p>
464 <p>XS_DEFINE_VERSION: -D line to set the xs version when compiling.</p>
465 <p>Called by init_main.</p>
467 </p>
468 <h3><a name="init_others_abstract">init_others <em>Abstract</em></a></h3>
469 <pre>
470 $MM-&gt;init_others();</pre>
471 <p>Initializes the macro definitions used by <code>tools_other()</code> and places them
472 in the $MM object.</p>
473 <p>If there is no description, its the same as the parameter to
474 <code>WriteMakefile()</code> documented in ExtUtils::MakeMaker.</p>
475 <p>Defines at least these macros.</p>
476 <pre>
477 Macro Description</pre>
478 <pre>
479 NOOP Do nothing
480 NOECHO Tell make not to display the command itself</pre>
481 <pre>
482 MAKEFILE
483 FIRST_MAKEFILE
484 MAKEFILE_OLD
485 MAKE_APERL_FILE File used by MAKE_APERL</pre>
486 <pre>
487 SHELL Program used to run
488 shell commands</pre>
489 <pre>
490 ECHO Print text adding a newline on the end
491 RM_F Remove a file
492 RM_RF Remove a directory
493 TOUCH Update a file's timestamp
494 TEST_F Test for a file's existence
495 CP Copy a file
496 MV Move a file
497 CHMOD Change permissions on a
498 file</pre>
499 <pre>
500 UMASK_NULL Nullify umask
501 DEV_NULL Supress all command output</pre>
503 </p>
504 <h3><a name="init_dirfilesep_abstract">init_DIRFILESEP <em>Abstract</em></a></h3>
505 <pre>
506 $MM-&gt;init_DIRFILESEP;
507 my $dirfilesep = $MM-&gt;{DIRFILESEP};</pre>
508 <p>Initializes the DIRFILESEP macro which is the seperator between the
509 directory and filename in a filepath. ie. / on Unix, \ on Win32 and
510 nothing on VMS.</p>
511 <p>For example:</p>
512 <pre>
513 # instead of $(INST_ARCHAUTODIR)/extralibs.ld
514 $(INST_ARCHAUTODIR)$(DIRFILESEP)extralibs.ld</pre>
515 <p>Something of a hack but it prevents a lot of code duplication between
516 MM_* variants.</p>
517 <p>Do not use this as a seperator between directories. Some operating
518 systems use different seperators between subdirectories as between
519 directories and filenames (for example: VOLUME:[dir1.dir2]file on VMS).</p>
521 </p>
522 <h3><a name="init_linker_abstract">init_linker <em>Abstract</em></a></h3>
523 <pre>
524 $mm-&gt;init_linker;</pre>
525 <p>Initialize macros which have to do with linking.</p>
526 <p>PERL_ARCHIVE: path to libperl.a equivalent to be linked to dynamic
527 extensions.</p>
528 <p>PERL_ARCHIVE_AFTER: path to a library which should be put on the
529 linker command line <em>after</em> the external libraries to be linked to
530 dynamic extensions. This may be needed if the linker is one-pass, and
531 Perl includes some overrides for C RTL functions, such as malloc().</p>
532 <p>EXPORT_LIST: name of a file that is passed to linker to define symbols
533 to be exported.</p>
534 <p>Some OSes do not need these in which case leave it blank.</p>
536 </p>
537 <h3><a name="init_platform">init_platform</a></h3>
538 <pre>
539 $mm-&gt;init_platform</pre>
540 <p>Initialize any macros which are for platform specific use only.</p>
541 <p>A typical one is the version number of your OS specific mocule.
542 (ie. MM_Unix_VERSION or MM_VMS_VERSION).</p>
544 </p>
545 <h2><a name="tools">Tools</a></h2>
546 <p>A grab bag of methods to generate specific macros and commands.</p>
548 </p>
549 <h3><a name="manifypods">manifypods</a></h3>
550 <p>Defines targets and routines to translate the pods into manpages and
551 put them into the INST_* directories.</p>
553 </p>
554 <h3><a name="pod2man_macro">POD2MAN_macro</a></h3>
555 <pre>
556 my $pod2man_macro = $self-&gt;POD2MAN_macro</pre>
557 <p>Returns a definition for the POD2MAN macro. This is a program
558 which emulates the pod2man utility. You can add more switches to the
559 command by simply appending them on the macro.</p>
560 <p>Typical usage:</p>
561 <pre>
562 $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) podfile1 man_page1 ...</pre>
564 </p>
565 <h3><a name="test_via_harness">test_via_harness</a></h3>
566 <pre>
567 my $command = $mm-&gt;test_via_harness($perl, $tests);</pre>
568 <p>Returns a $command line which runs the given set of $tests with
569 Test::Harness and the given $perl.</p>
570 <p>Used on the t/*.t files.</p>
572 </p>
573 <h3><a name="test_via_script">test_via_script</a></h3>
574 <pre>
575 my $command = $mm-&gt;test_via_script($perl, $script);</pre>
576 <p>Returns a $command line which just runs a single test without
577 Test::Harness. No checks are done on the results, they're just
578 printed.</p>
579 <p>Used for test.pl, since they don't always follow Test::Harness
580 formatting.</p>
582 </p>
583 <h3><a name="tool_autosplit">tool_autosplit</a></h3>
584 <p>Defines a simple perl call that runs autosplit. May be deprecated by
585 pm_to_blib soon.</p>
587 </p>
588 <h2><a name="file__spec_wrappers">File::Spec wrappers</a></h2>
589 <p>ExtUtils::MM_Any is a subclass of File::Spec. The methods noted here
590 override File::Spec.</p>
592 </p>
593 <h3><a name="catfile">catfile</a></h3>
594 <p>File::Spec &lt;= 0.83 has a bug where the file part of catfile is not
595 canonicalized. This override fixes that bug.</p>
597 </p>
598 <h2><a name="misc">Misc</a></h2>
599 <p>Methods I can't really figure out where they should go yet.</p>
601 </p>
602 <h3><a name="find_tests">find_tests</a></h3>
603 <pre>
604 my $test = $mm-&gt;find_tests;</pre>
605 <p>Returns a string suitable for feeding to the shell to return all
606 tests in t/*.t.</p>
608 </p>
609 <h3><a name="extra_clean_files">extra_clean_files</a></h3>
610 <pre>
611 my @files_to_clean = $MM-&gt;extra_clean_files;</pre>
612 <p>Returns a list of OS specific files to be removed in the clean target in
613 addition to the usual set.</p>
615 </p>
616 <h3><a name="installvars">installvars</a></h3>
617 <pre>
618 my @installvars = $mm-&gt;installvars;</pre>
619 <p>A list of all the INSTALL* variables without the INSTALL prefix. Useful
620 for iteration or building related variable sets.</p>
622 </p>
623 <h3><a name="libscan">libscan</a></h3>
624 <pre>
625 my $wanted = $self-&gt;libscan($path);</pre>
626 <p>Takes a path to a file or dir and returns an empty string if we don't
627 want to include this file in the library. Otherwise it returns the
628 the $path unchanged.</p>
629 <p>Mainly used to exclude version control administrative directories from
630 installation.</p>
632 </p>
633 <h3><a name="platform_constants">platform_constants</a></h3>
634 <pre>
635 my $make_frag = $mm-&gt;platform_constants</pre>
636 <p>Returns a make fragment defining all the macros initialized in
637 <code>init_platform()</code> rather than put them in constants().</p>
639 </p>
640 <hr />
641 <h1><a name="author">AUTHOR</a></h1>
642 <p>Michael G Schwern &lt;<a href="mailto:schwern@pobox.com">schwern@pobox.com</a>&gt; and the denizens of
643 <a href="mailto:makemaker@perl.org">makemaker@perl.org</a> with code from ExtUtils::MM_Unix and
644 ExtUtils::MM_Win32.</p>
645 <table border="0" width="100%" cellspacing="0" cellpadding="3">
646 <tr><td class="block" style="background-color: #cccccc" valign="middle">
647 <big><strong><span class="block">&nbsp;ExtUtils::MM_Any - Platform-agnostic MM methods</span></strong></big>
648 </td></tr>
649 </table>
651 </body>
653 </html>