1ExtUtils::MakeMaker(3pm)Perl Programmers Reference GuideExtUtils::MakeMaker(3pm)
2
3
4

NAME

6       ExtUtils::MakeMaker - Create a module Makefile
7

SYNOPSIS

9         use ExtUtils::MakeMaker;
10
11         WriteMakefile( ATTRIBUTE => VALUE [, ...] );
12

DESCRIPTION

14       This utility is designed to write a Makefile for an extension module
15       from a Makefile.PL. It is based on the Makefile.SH model provided by
16       Andy Dougherty and the perl5-porters.
17
18       It splits the task of generating the Makefile into several subroutines
19       that can be individually overridden.  Each subroutine returns the text
20       it wishes to have written to the Makefile.
21
22       MakeMaker is object oriented. Each directory below the current direc‐
23       tory that contains a Makefile.PL is treated as a separate object. This
24       makes it possible to write an unlimited number of Makefiles with a sin‐
25       gle invocation of WriteMakefile().
26
27       How To Write A Makefile.PL
28
29       See ExtUtils::MakeMaker::Tutorial.
30
31       The long answer is the rest of the manpage :-)
32
33       Default Makefile Behaviour
34
35       The generated Makefile enables the user of the extension to invoke
36
37         perl Makefile.PL # optionally "perl Makefile.PL verbose"
38         make
39         make test        # optionally set TEST_VERBOSE=1
40         make install     # See below
41
42       The Makefile to be produced may be altered by adding arguments of the
43       form "KEY=VALUE". E.g.
44
45         perl Makefile.PL PREFIX=~
46
47       Other interesting targets in the generated Makefile are
48
49         make config     # to check if the Makefile is up-to-date
50         make clean      # delete local temp files (Makefile gets renamed)
51         make realclean  # delete derived files (including ./blib)
52         make ci         # check in all the files in the MANIFEST file
53         make dist       # see below the Distribution Support section
54
55       make test
56
57       MakeMaker checks for the existence of a file named test.pl in the cur‐
58       rent directory and if it exists it execute the script with the proper
59       set of perl "-I" options.
60
61       MakeMaker also checks for any files matching glob("t/*.t"). It will
62       execute all matching files in alphabetical order via the Test::Harness
63       module with the "-I" switches set correctly.
64
65       If you'd like to see the raw output of your tests, set the "TEST_VER‐
66       BOSE" variable to true.
67
68         make test TEST_VERBOSE=1
69
70       make testdb
71
72       A useful variation of the above is the target "testdb". It runs the
73       test under the Perl debugger (see perldebug). If the file test.pl
74       exists in the current directory, it is used for the test.
75
76       If you want to debug some other testfile, set the "TEST_FILE" variable
77       thusly:
78
79         make testdb TEST_FILE=t/mytest.t
80
81       By default the debugger is called using "-d" option to perl. If you
82       want to specify some other option, set the "TESTDB_SW" variable:
83
84         make testdb TESTDB_SW=-Dx
85
86       make install
87
88       make alone puts all relevant files into directories that are named by
89       the macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR and
90       INST_MAN3DIR.  All these default to something below ./blib if you are
91       not building below the perl source directory. If you are building below
92       the perl source, INST_LIB and INST_ARCHLIB default to ../../lib, and
93       INST_SCRIPT is not defined.
94
95       The install target of the generated Makefile copies the files found
96       below each of the INST_* directories to their INSTALL* counterparts.
97       Which counterparts are chosen depends on the setting of INSTALLDIRS
98       according to the following table:
99
100                                        INSTALLDIRS set to
101                                  perl        site          vendor
102
103                        PERLPREFIX      SITEPREFIX          VENDORPREFIX
104         INST_ARCHLIB   INSTALLARCHLIB  INSTALLSITEARCH     INSTALLVENDORARCH
105         INST_LIB       INSTALLPRIVLIB  INSTALLSITELIB      INSTALLVENDORLIB
106         INST_BIN       INSTALLBIN      INSTALLSITEBIN      INSTALLVENDORBIN
107         INST_SCRIPT    INSTALLSCRIPT   INSTALLSCRIPT       INSTALLSCRIPT
108         INST_MAN1DIR   INSTALLMAN1DIR  INSTALLSITEMAN1DIR  INSTALLVENDORMAN1DIR
109         INST_MAN3DIR   INSTALLMAN3DIR  INSTALLSITEMAN3DIR  INSTALLVENDORMAN3DIR
110
111       The INSTALL... macros in turn default to their %Config ($Con‐
112       fig{installprivlib}, $Config{installarchlib}, etc.) counterparts.
113
114       You can check the values of these variables on your system with
115
116           perl '-V:install.*'
117
118       And to check the sequence in which the library directories are searched
119       by perl, run
120
121           perl -le 'print join $/, @INC'
122
123       Sometimes older versions of the module you're installing live in other
124       directories in @INC.  Because Perl loads the first version of a module
125       it finds, not the newest, you might accidentally get one of these older
126       versions even after installing a brand new version.  To delete all
127       other versions of the module you're installing (not simply older ones)
128       set the "UNINST" variable.
129
130           make install UNINST=1
131
132       PREFIX and LIB attribute
133
134       PREFIX and LIB can be used to set several INSTALL* attributes in one
135       go. The quickest way to install a module in a non-standard place might
136       be
137
138           perl Makefile.PL PREFIX=~
139
140       This will install all files in the module under your home directory,
141       with man pages and libraries going into an appropriate place (usually
142       ~/man and ~/lib).
143
144       Another way to specify many INSTALL directories with a single parameter
145       is LIB.
146
147           perl Makefile.PL LIB=~/lib
148
149       This will install the module's architecture-independent files into
150       ~/lib, the architecture-dependent files into ~/lib/$archname.
151
152       Note, that in both cases the tilde expansion is done by MakeMaker, not
153       by perl by default, nor by make.
154
155       Conflicts between parameters LIB, PREFIX and the various INSTALL* argu‐
156       ments are resolved so that:
157
158       ·   setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCH‐
159           LIB, INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by
160           PREFIX);
161
162       ·   without LIB, setting PREFIX replaces the initial $Config{prefix}
163           part of those INSTALL* arguments, even if the latter are explicitly
164           set (but are set to still start with $Config{prefix}).
165
166       If the user has superuser privileges, and is not working on AFS or rel‐
167       atives, then the defaults for INSTALLPRIVLIB, INSTALLARCHLIB,
168       INSTALLSCRIPT, etc. will be appropriate, and this incantation will be
169       the best:
170
171           perl Makefile.PL;
172           make;
173           make test
174           make install
175
176       make install per default writes some documentation of what has been
177       done into the file "$(INSTALLARCHLIB)/perllocal.pod". This feature can
178       be bypassed by calling make pure_install.
179
180       AFS users
181
182       will have to specify the installation directories as these most proba‐
183       bly have changed since perl itself has been installed. They will have
184       to do this by calling
185
186           perl Makefile.PL INSTALLSITELIB=/afs/here/today \
187               INSTALLSCRIPT=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages
188           make
189
190       Be careful to repeat this procedure every time you recompile an exten‐
191       sion, unless you are sure the AFS installation directories are still
192       valid.
193
194       Static Linking of a new Perl Binary
195
196       An extension that is built with the above steps is ready to use on sys‐
197       tems supporting dynamic loading. On systems that do not support dynamic
198       loading, any newly created extension has to be linked together with the
199       available resources. MakeMaker supports the linking process by creating
200       appropriate targets in the Makefile whenever an extension is built. You
201       can invoke the corresponding section of the makefile with
202
203           make perl
204
205       That produces a new perl binary in the current directory with all
206       extensions linked in that can be found in INST_ARCHLIB, SITELIBEXP, and
207       PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on UNIX,
208       this is called Makefile.aperl (may be system dependent). If you want to
209       force the creation of a new perl, it is recommended, that you delete
210       this Makefile.aperl, so the directories are searched-through for link‐
211       able libraries again.
212
213       The binary can be installed into the directory where perl normally
214       resides on your machine with
215
216           make inst_perl
217
218       To produce a perl binary with a different name than "perl", either say
219
220           perl Makefile.PL MAP_TARGET=myperl
221           make myperl
222           make inst_perl
223
224       or say
225
226           perl Makefile.PL
227           make myperl MAP_TARGET=myperl
228           make inst_perl MAP_TARGET=myperl
229
230       In any case you will be prompted with the correct invocation of the
231       "inst_perl" target that installs the new binary into INSTALLBIN.
232
233       make inst_perl per default writes some documentation of what has been
234       done into the file "$(INSTALLARCHLIB)/perllocal.pod". This can be
235       bypassed by calling make pure_inst_perl.
236
237       Warning: the inst_perl: target will most probably overwrite your exist‐
238       ing perl binary. Use with care!
239
240       Sometimes you might want to build a statically linked perl although
241       your system supports dynamic loading. In this case you may explicitly
242       set the linktype with the invocation of the Makefile.PL or make:
243
244           perl Makefile.PL LINKTYPE=static    # recommended
245
246       or
247
248           make LINKTYPE=static                # works on most systems
249
250       Determination of Perl Library and Installation Locations
251
252       MakeMaker needs to know, or to guess, where certain things are located.
253       Especially INST_LIB and INST_ARCHLIB (where to put the files during the
254       make(1) run), PERL_LIB and PERL_ARCHLIB (where to read existing modules
255       from), and PERL_INC (header files and "libperl*.*").
256
257       Extensions may be built either using the contents of the perl source
258       directory tree or from the installed perl library. The recommended way
259       is to build extensions after you have run 'make install' on perl
260       itself. You can do that in any directory on your hard disk that is not
261       below the perl source tree. The support for extensions below the ext
262       directory of the perl distribution is only good for the standard exten‐
263       sions that come with perl.
264
265       If an extension is being built below the "ext/" directory of the perl
266       source then MakeMaker will set PERL_SRC automatically (e.g., "../..").
267       If PERL_SRC is defined and the extension is recognized as a standard
268       extension, then other variables default to the following:
269
270         PERL_INC     = PERL_SRC
271         PERL_LIB     = PERL_SRC/lib
272         PERL_ARCHLIB = PERL_SRC/lib
273         INST_LIB     = PERL_LIB
274         INST_ARCHLIB = PERL_ARCHLIB
275
276       If an extension is being built away from the perl source then MakeMaker
277       will leave PERL_SRC undefined and default to using the installed copy
278       of the perl library. The other variables default to the following:
279
280         PERL_INC     = $archlibexp/CORE
281         PERL_LIB     = $privlibexp
282         PERL_ARCHLIB = $archlibexp
283         INST_LIB     = ./blib/lib
284         INST_ARCHLIB = ./blib/arch
285
286       If perl has not yet been installed then PERL_SRC can be defined on the
287       command line as shown in the previous section.
288
289       Which architecture dependent directory?
290
291       If you don't want to keep the defaults for the INSTALL* macros, Make‐
292       Maker helps you to minimize the typing needed: the usual relationship
293       between INSTALLPRIVLIB and INSTALLARCHLIB is determined by Configure at
294       perl compilation time. MakeMaker supports the user who sets INSTALL‐
295       PRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not, then Make‐
296       Maker defaults the latter to be the same subdirectory of INSTALLPRIVLIB
297       as Configure decided for the counterparts in %Config , otherwise it
298       defaults to INSTALLPRIVLIB. The same relationship holds for INSTALL‐
299       SITELIB and INSTALLSITEARCH.
300
301       MakeMaker gives you much more freedom than needed to configure internal
302       variables and get different results. It is worth to mention, that
303       make(1) also lets you configure most of the variables that are used in
304       the Makefile. But in the majority of situations this will not be neces‐
305       sary, and should only be done if the author of a package recommends it
306       (or you know what you're doing).
307
308       Using Attributes and Parameters
309
310       The following attributes may be specified as arguments to WriteMake‐
311       file() or as NAME=VALUE pairs on the command line.
312
313       ABSTRACT
314         One line description of the module. Will be included in PPD file.
315
316       ABSTRACT_FROM
317         Name of the file that contains the package description. MakeMaker
318         looks for a line in the POD matching /^($package\s-\s)(.*)/. This is
319         typically the first line in the "=head1 NAME" section. $2 becomes the
320         abstract.
321
322       AUTHOR
323         String containing name (and email address) of package author(s). Is
324         used in PPD (Perl Package Description) files for PPM (Perl Package
325         Manager).
326
327       BINARY_LOCATION
328         Used when creating PPD files for binary packages.  It can be set to a
329         full or relative path or URL to the binary archive for a particular
330         architecture.  For example:
331
332                 perl Makefile.PL BINARY_LOCATION=x86/Agent.tar.gz
333
334         builds a PPD package that references a binary of the "Agent" package,
335         located in the "x86" directory relative to the PPD itself.
336
337       C Ref to array of *.c file names. Initialised from a directory scan and
338         the values portion of the XS attribute hash. This is not currently
339         used by MakeMaker but may be handy in Makefile.PLs.
340
341       CCFLAGS
342         String that will be included in the compiler call command line
343         between the arguments INC and OPTIMIZE.
344
345       CONFIG
346         Arrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from
347         config.sh. MakeMaker will add to CONFIG the following values anyway:
348         ar cc cccdlflags ccdlflags dlext dlsrc ld lddlflags ldflags libc
349         lib_ext obj_ext ranlib sitelibexp sitearchexp so
350
351       CONFIGURE
352         CODE reference. The subroutine should return a hash reference. The
353         hash may contain further attributes, e.g. {LIBS => ...}, that have to
354         be determined by some evaluation method.
355
356       DEFINE
357         Something like "-DHAVE_UNISTD_H"
358
359       DESTDIR
360         This is the root directory into which the code will be installed.  It
361         prepends itself to the normal prefix.  For example, if your code
362         would normally go into /usr/local/lib/perl you could set DEST‐
363         DIR=~/myperl/ and installation would go into
364         ~/myperl/usr/local/lib/perl.
365
366         This is primarily of use for people who repackage Perl modules.
367
368         NOTE: Due to the nature of make, it is important that you put the
369         trailing slash on your DESTDIR.  "~/myperl/" not "~/myperl".
370
371       DIR
372         Ref to array of subdirectories containing Makefile.PLs e.g. [ 'sdbm'
373         ] in ext/SDBM_File
374
375       DISTNAME
376         A safe filename for the package.
377
378         Defaults to NAME above but with :: replaced with -.
379
380         For example, Foo::Bar becomes Foo-Bar.
381
382       DISTVNAME
383         Your name for distributing the package with the version number
384         included.  This is used by 'make dist' to name the resulting archive
385         file.
386
387         Defaults to DISTNAME-VERSION.
388
389         For example, version 1.04 of Foo::Bar becomes Foo-Bar-1.04.
390
391         On some OS's where . has special meaning VERSION_SYM may be used in
392         place of VERSION.
393
394       DL_FUNCS
395         Hashref of symbol names for routines to be made available as univer‐
396         sal symbols.  Each key/value pair consists of the package name and an
397         array of routine names in that package.  Used only under AIX, OS/2,
398         VMS and Win32 at present.  The routine names supplied will be
399         expanded in the same way as XSUB names are expanded by the XS()
400         macro.  Defaults to
401
402           {"$(NAME)" => ["boot_$(NAME)" ] }
403
404         e.g.
405
406           {"RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )],
407            "NetconfigPtr" => [ 'DESTROY'] }
408
409         Please see the ExtUtils::Mksymlists documentation for more informa‐
410         tion about the DL_FUNCS, DL_VARS and FUNCLIST attributes.
411
412       DL_VARS
413         Array of symbol names for variables to be made available as universal
414         symbols.  Used only under AIX, OS/2, VMS and Win32 at present.
415         Defaults to [].  (e.g. [ qw(Foo_version Foo_numstreams Foo_tree ) ])
416
417       EXCLUDE_EXT
418         Array of extension names to exclude when doing a static build.  This
419         is ignored if INCLUDE_EXT is present.  Consult INCLUDE_EXT for more
420         details.  (e.g.  [ qw( Socket POSIX ) ] )
421
422         This attribute may be most useful when specified as a string on the
423         command line:  perl Makefile.PL EXCLUDE_EXT='Socket Safe'
424
425       EXE_FILES
426         Ref to array of executable files. The files will be copied to the
427         INST_SCRIPT directory. Make realclean will delete them from there
428         again.
429
430         If your executables start with something like #!perl or
431         #!/usr/bin/perl MakeMaker will change this to the path of the perl
432         'Makefile.PL' was invoked with so the programs will be sure to run
433         properly even if perl is not in /usr/bin/perl.
434
435       FIRST_MAKEFILE
436         The name of the Makefile to be produced.  This is used for the second
437         Makefile that will be produced for the MAP_TARGET.
438
439         Defaults to 'Makefile' or 'Descrip.MMS' on VMS.
440
441         (Note: we couldn't use MAKEFILE because dmake uses this for something
442         else).
443
444       FULLPERL
445         Perl binary able to run this extension, load XS modules, etc...
446
447       FULLPERLRUN
448         Like PERLRUN, except it uses FULLPERL.
449
450       FULLPERLRUNINST
451         Like PERLRUNINST, except it uses FULLPERL.
452
453       FUNCLIST
454         This provides an alternate means to specify function names to be
455         exported from the extension.  Its value is a reference to an array of
456         function names to be exported by the extension.  These names are
457         passed through unaltered to the linker options file.
458
459       H Ref to array of *.h file names. Similar to C.
460
461       IMPORTS
462         This attribute is used to specify names to be imported into the
463         extension. Takes a hash ref.
464
465         It is only used on OS/2 and Win32.
466
467       INC
468         Include file dirs eg: "-I/usr/5include -I/path/to/inc"
469
470       INCLUDE_EXT
471         Array of extension names to be included when doing a static build.
472         MakeMaker will normally build with all of the installed extensions
473         when doing a static build, and that is usually the desired behavior.
474         If INCLUDE_EXT is present then MakeMaker will build only with those
475         extensions which are explicitly mentioned. (e.g.  [ qw( Socket POSIX
476         ) ])
477
478         It is not necessary to mention DynaLoader or the current extension
479         when filling in INCLUDE_EXT.  If the INCLUDE_EXT is mentioned but is
480         empty then only DynaLoader and the current extension will be included
481         in the build.
482
483         This attribute may be most useful when specified as a string on the
484         command line:  perl Makefile.PL INCLUDE_EXT='POSIX Socket
485         Devel::Peek'
486
487       INSTALLARCHLIB
488         Used by 'make install', which copies files from INST_ARCHLIB to this
489         directory if INSTALLDIRS is set to perl.
490
491       INSTALLBIN
492         Directory to install binary files (e.g. tkperl) into if
493         INSTALLDIRS=perl.
494
495       INSTALLDIRS
496         Determines which of the sets of installation directories to choose:
497         perl, site or vendor.  Defaults to site.
498
499       INSTALLMAN1DIR
500       INSTALLMAN3DIR
501         These directories get the man pages at 'make install' time if
502         INSTALLDIRS=perl.  Defaults to $Config{installman*dir}.
503
504         If set to 'none', no man pages will be installed.
505
506       INSTALLPRIVLIB
507         Used by 'make install', which copies files from INST_LIB to this
508         directory if INSTALLDIRS is set to perl.
509
510         Defaults to $Config{installprivlib}.
511
512       INSTALLSCRIPT
513         Used by 'make install' which copies files from INST_SCRIPT to this
514         directory.
515
516       INSTALLSITEARCH
517         Used by 'make install', which copies files from INST_ARCHLIB to this
518         directory if INSTALLDIRS is set to site (default).
519
520       INSTALLSITEBIN
521         Used by 'make install', which copies files from INST_BIN to this
522         directory if INSTALLDIRS is set to site (default).
523
524       INSTALLSITELIB
525         Used by 'make install', which copies files from INST_LIB to this
526         directory if INSTALLDIRS is set to site (default).
527
528       INSTALLSITEMAN1DIR
529       INSTALLSITEMAN3DIR
530         These directories get the man pages at 'make install' time if
531         INSTALLDIRS=site (default).  Defaults to $(SITEPRE‐
532         FIX)/man/man$(MAN*EXT).
533
534         If set to 'none', no man pages will be installed.
535
536       INSTALLVENDORARCH
537         Used by 'make install', which copies files from INST_ARCHLIB to this
538         directory if INSTALLDIRS is set to vendor.
539
540       INSTALLVENDORBIN
541         Used by 'make install', which copies files from INST_BIN to this
542         directory if INSTALLDIRS is set to vendor.
543
544       INSTALLVENDORLIB
545         Used by 'make install', which copies files from INST_LIB to this
546         directory if INSTALLDIRS is set to vendor.
547
548       INSTALLVENDORMAN1DIR
549       INSTALLVENDORMAN3DIR
550         These directories get the man pages at 'make install' time if
551         INSTALLDIRS=vendor.  Defaults to $(VENDORPREFIX)/man/man$(MAN*EXT).
552
553         If set to 'none', no man pages will be installed.
554
555       INST_ARCHLIB
556         Same as INST_LIB for architecture dependent files.
557
558       INST_BIN
559         Directory to put real binary files during 'make'. These will be
560         copied to INSTALLBIN during 'make install'
561
562       INST_LIB
563         Directory where we put library files of this extension while building
564         it.
565
566       INST_MAN1DIR
567         Directory to hold the man pages at 'make' time
568
569       INST_MAN3DIR
570         Directory to hold the man pages at 'make' time
571
572       INST_SCRIPT
573         Directory, where executable files should be installed during 'make'.
574         Defaults to "./blib/script", just to have a dummy location during
575         testing. make install will copy the files in INST_SCRIPT to
576         INSTALLSCRIPT.
577
578       LD
579         Program to be used to link libraries for dynamic loading.
580
581         Defaults to $Config{ld}.
582
583       LDDLFLAGS
584         Any special flags that might need to be passed to ld to create a
585         shared library suitable for dynamic loading.  It is up to the make‐
586         file to use it.  (See "lddlflags" in Config)
587
588         Defaults to $Config{lddlflags}.
589
590       LDFROM
591         Defaults to "$(OBJECT)" and is used in the ld command to specify what
592         files to link/load from (also see dynamic_lib below for how to spec‐
593         ify ld flags)
594
595       LIB
596         LIB should only be set at "perl Makefile.PL" time but is allowed as a
597         MakeMaker argument. It has the effect of setting both INSTALLPRIVLIB
598         and INSTALLSITELIB to that value regardless any explicit setting of
599         those arguments (or of PREFIX).  INSTALLARCHLIB and INSTALLSITEARCH
600         are set to the corresponding architecture subdirectory.
601
602       LIBPERL_A
603         The filename of the perllibrary that will be used together with this
604         extension. Defaults to libperl.a.
605
606       LIBS
607         An anonymous array of alternative library specifications to be
608         searched for (in order) until at least one library is found. E.g.
609
610           'LIBS' => ["-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs"]
611
612         Mind, that any element of the array contains a complete set of argu‐
613         ments for the ld command. So do not specify
614
615           'LIBS' => ["-ltcl", "-ltk", "-lX11"]
616
617         See ODBM_File/Makefile.PL for an example, where an array is needed.
618         If you specify a scalar as in
619
620           'LIBS' => "-ltcl -ltk -lX11"
621
622         MakeMaker will turn it into an array with one element.
623
624       LINKTYPE
625         'static' or 'dynamic' (default unless usedl=undef in config.sh).
626         Should only be used to force static linking (also see linkext below).
627
628       MAKEAPERL
629         Boolean which tells MakeMaker, that it should include the rules to
630         make a perl. This is handled automatically as a switch by MakeMaker.
631         The user normally does not need it.
632
633       MAKEFILE_OLD
634         When 'make clean' or similar is run, the $(FIRST_MAKEFILE) will be
635         backed up at this location.
636
637         Defaults to $(FIRST_MAKEFILE).old or $(FIRST_MAKEFILE)_old on VMS.
638
639       MAN1PODS
640         Hashref of pod-containing files. MakeMaker will default this to all
641         EXE_FILES files that include POD directives. The files listed here
642         will be converted to man pages and installed as was requested at Con‐
643         figure time.
644
645       MAN3PODS
646         Hashref that assigns to *.pm and *.pod files the files into which the
647         manpages are to be written. MakeMaker parses all *.pod and *.pm files
648         for POD directives. Files that contain POD will be the default keys
649         of the MAN3PODS hashref. These will then be converted to man pages
650         during "make" and will be installed during "make install".
651
652       MAP_TARGET
653         If it is intended, that a new perl binary be produced, this variable
654         may hold a name for that binary. Defaults to perl
655
656       MYEXTLIB
657         If the extension links to a library that it builds set this to the
658         name of the library (see SDBM_File)
659
660       NAME
661         Perl module name for this extension (DBD::Oracle). This will default
662         to the directory name but should be explicitly defined in the Make‐
663         file.PL.
664
665       NEEDS_LINKING
666         MakeMaker will figure out if an extension contains linkable code any‐
667         where down the directory tree, and will set this variable accord‐
668         ingly, but you can speed it up a very little bit if you define this
669         boolean variable yourself.
670
671       NOECHO
672         Command so make does not print the literal commands its running.
673
674         By setting it to an empty string you can generate a Makefile that
675         prints all commands. Mainly used in debugging MakeMaker itself.
676
677         Defaults to "@".
678
679       NORECURS
680         Boolean.  Attribute to inhibit descending into subdirectories.
681
682       NO_META
683         When true, suppresses the generation and addition to the MANIFEST of
684         the META.yml module meta-data file during 'make distdir'.
685
686         Defaults to false.
687
688       NO_VC
689         In general, any generated Makefile checks for the current version of
690         MakeMaker and the version the Makefile was built under. If NO_VC is
691         set, the version check is neglected. Do not write this into your
692         Makefile.PL, use it interactively instead.
693
694       OBJECT
695         List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be
696         a long string containing all object files, e.g. "tkpBind.o tkpBut‐
697         ton.o tkpCanvas.o"
698
699         (Where BASEEXT is the last component of NAME, and OBJ_EXT is $Con‐
700         fig{obj_ext}.)
701
702       OPTIMIZE
703         Defaults to "-O". Set it to "-g" to turn debugging on. The flag is
704         passed to subdirectory makes.
705
706       PERL
707         Perl binary for tasks that can be done by miniperl
708
709       PERL_CORE
710         Set only when MakeMaker is building the extensions of the Perl core
711         distribution.
712
713       PERLMAINCC
714         The call to the program that is able to compile perlmain.c. Defaults
715         to $(CC).
716
717       PERL_ARCHLIB
718         Same as for PERL_LIB, but for architecture dependent files.
719
720         Used only when MakeMaker is building the extensions of the Perl core
721         distribution (because normally $(PERL_ARCHLIB) is automatically in
722         @INC, and adding it would get in the way of PERL5LIB).
723
724       PERL_LIB
725         Directory containing the Perl library to use.
726
727         Used only when MakeMaker is building the extensions of the Perl core
728         distribution (because normally $(PERL_LIB) is automatically in @INC,
729         and adding it would get in the way of PERL5LIB).
730
731       PERL_MALLOC_OK
732         defaults to 0.  Should be set to TRUE if the extension can work with
733         the memory allocation routines substituted by the Perl malloc() sub‐
734         system.  This should be applicable to most extensions with exceptions
735         of those
736
737         *   with bugs in memory allocations which are caught by Perl's mal‐
738             loc();
739
740         *   which interact with the memory allocator in other ways than via
741             malloc(), realloc(), free(), calloc(), sbrk() and brk();
742
743         *   which rely on special alignment which is not provided by Perl's
744             malloc().
745
746         NOTE.  Negligence to set this flag in any one of loaded extension
747         nullifies many advantages of Perl's malloc(), such as better usage of
748         system resources, error detection, memory usage reporting, catchable
749         failure of memory allocations, etc.
750
751       PERLPREFIX
752         Directory under which core modules are to be installed.
753
754         Defaults to $Config{installprefixexp} falling back to $Con‐
755         fig{installprefix}, $Config{prefixexp} or $Config{prefix} should
756         $Config{installprefixexp} not exist.
757
758         Overridden by PREFIX.
759
760       PERLRUN
761         Use this instead of $(PERL) when you wish to run perl.  It will set
762         up extra necessary flags for you.
763
764       PERLRUNINST
765         Use this instead of $(PERL) when you wish to run perl to work with
766         modules.  It will add things like -I$(INST_ARCH) and other necessary
767         flags so perl can see the modules you're about to install.
768
769       PERL_SRC
770         Directory containing the Perl source code (use of this should be
771         avoided, it may be undefined)
772
773       PERM_RW
774         Desired permission for read/writable files. Defaults to 644.  See
775         also "perm_rw" in MM_Unix.
776
777       PERM_RWX
778         Desired permission for executable files. Defaults to 755.  See also
779         "perm_rwx" in MM_Unix.
780
781       PL_FILES
782         MakeMaker can run programs to generate files for you at build time.
783         By default any file named *.PL (except Makefile.PL and Build.PL) in
784         the top level directory will be assumed to be a Perl program and run
785         passing its own basename in as an argument.  For example...
786
787             perl foo.PL foo
788
789         This behavior can be overridden by supplying your own set of files to
790         search.  PL_FILES accepts a hash ref, the key being the file to run
791         and the value is passed in as the first argument when the PL file is
792         run.
793
794             PL_FILES => {'bin/foobar.PL' => 'bin/foobar'}
795
796         Would run bin/foobar.PL like this:
797
798             perl bin/foobar.PL bin/foobar
799
800         If multiple files from one program are desired an array ref can be
801         used.
802
803             PL_FILES => {'bin/foobar.PL' => [qw(bin/foobar1 bin/foobar2)]}
804
805         In this case the program will be run multiple times using each target
806         file.
807
808             perl bin/foobar.PL bin/foobar1
809             perl bin/foobar.PL bin/foobar2
810
811         PL files are normally run after pm_to_blib and include INST_LIB and
812         INST_ARCH in its @INC so the just built modules can be accessed...
813         unless the PL file is making a module (or anything else in PM) in
814         which case it is run before pm_to_blib and does not include INST_LIB
815         and INST_ARCH in its @INC.  This apparently odd behavior is there for
816         backwards compatibility (and its somewhat DWIM).
817
818       PM
819         Hashref of .pm files and *.pl files to be installed.  e.g.
820
821           {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'}
822
823         By default this will include *.pm and *.pl and the files found in the
824         PMLIBDIRS directories.  Defining PM in the Makefile.PL will override
825         PMLIBDIRS.
826
827       PMLIBDIRS
828         Ref to array of subdirectories containing library files.  Defaults to
829         [ 'lib', $(BASEEXT) ]. The directories will be scanned and any files
830         they contain will be installed in the corresponding location in the
831         library.  A libscan() method can be used to alter the behaviour.
832         Defining PM in the Makefile.PL will override PMLIBDIRS.
833
834         (Where BASEEXT is the last component of NAME.)
835
836       PM_FILTER
837         A filter program, in the traditional Unix sense (input from stdin,
838         output to stdout) that is passed on each .pm file during the build
839         (in the pm_to_blib() phase).  It is empty by default, meaning no fil‐
840         tering is done.
841
842         Great care is necessary when defining the command if quoting needs to
843         be done.  For instance, you would need to say:
844
845           {'PM_FILTER' => 'grep -v \\"^\\#\\"'}
846
847         to remove all the leading coments on the fly during the build.  The
848         extra \\ are necessary, unfortunately, because this variable is
849         interpolated within the context of a Perl program built on the com‐
850         mand line, and double quotes are what is used with the -e switch to
851         build that command line.  The # is escaped for the Makefile, since
852         what is going to be generated will then be:
853
854           PM_FILTER = grep -v \"^\#\"
855
856         Without the \\ before the #, we'd have the start of a Makefile com‐
857         ment, and the macro would be incorrectly defined.
858
859       POLLUTE
860         Release 5.005 grandfathered old global symbol names by providing pre‐
861         processor macros for extension source compatibility.  As of release
862         5.6, these preprocessor definitions are not available by default.
863         The POLLUTE flag specifies that the old names should still be
864         defined:
865
866           perl Makefile.PL POLLUTE=1
867
868         Please inform the module author if this is necessary to successfully
869         install a module under 5.6 or later.
870
871       PPM_INSTALL_EXEC
872         Name of the executable used to run "PPM_INSTALL_SCRIPT" below. (e.g.
873         perl)
874
875       PPM_INSTALL_SCRIPT
876         Name of the script that gets executed by the Perl Package Manager
877         after the installation of a package.
878
879       PREFIX
880         This overrides all the default install locations.  Man pages,
881         libraries, scripts, etc...  MakeMaker will try to make an educated
882         guess about where to place things under the new PREFIX based on your
883         Config defaults.  Failing that, it will fall back to a structure
884         which should be sensible for your platform.
885
886         If you specify LIB or any INSTALL* variables they will not be
887         effected by the PREFIX.
888
889       PREREQ_FATAL
890         Bool. If this parameter is true, failing to have the required modules
891         (or the right versions thereof) will be fatal. perl Makefile.PL will
892         die with the proper message.
893
894         Note: see Test::Harness for a shortcut for stopping tests early if
895         you are missing dependencies.
896
897         Do not use this parameter for simple requirements, which could be
898         resolved at a later time, e.g. after an unsuccessful make test of
899         your module.
900
901         It is extremely rare to have to use "PREREQ_FATAL" at all!
902
903       PREREQ_PM
904         Hashref: Names of modules that need to be available to run this
905         extension (e.g. Fcntl for SDBM_File) are the keys of the hash and the
906         desired version is the value. If the required version number is 0, we
907         only check if any version is installed already.
908
909       PREREQ_PRINT
910         Bool.  If this parameter is true, the prerequisites will be printed
911         to stdout and MakeMaker will exit.  The output format is an evalable
912         hash ref.
913
914         $PREREQ_PM = {
915                        'A::B' => Vers1,
916                        'C::D' => Vers2,
917                        ...
918                      };
919
920       PRINT_PREREQ
921         RedHatism for "PREREQ_PRINT".  The output format is different,
922         though:
923
924             perl(A::B)>=Vers1 perl(C::D)>=Vers2 ...
925
926       SITEPREFIX
927         Like PERLPREFIX, but only for the site install locations.
928
929         Defaults to $Config{siteprefixexp}.  Perls prior to 5.6.0 didn't have
930         an explicit siteprefix in the Config.  In those cases $Con‐
931         fig{installprefix} will be used.
932
933         Overridable by PREFIX
934
935       SIGN
936         When true, perform the generation and addition to the MANIFEST of the
937         SIGNATURE file in the distdir during 'make distdir', via 'cpansign
938         -s'.
939
940         Note that you need to install the Module::Signature module to perform
941         this operation.
942
943         Defaults to false.
944
945       SKIP
946         Arrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the
947         Makefile. Caution! Do not use the SKIP attribute for the negligible
948         speedup. It may seriously damage the resulting Makefile. Only use it
949         if you really need it.
950
951       TYPEMAPS
952         Ref to array of typemap file names.  Use this when the typemaps are
953         in some directory other than the current directory or when they are
954         not named typemap.  The last typemap in the list takes precedence.  A
955         typemap in the current directory has highest precedence, even if it
956         isn't listed in TYPEMAPS.  The default system typemap has lowest
957         precedence.
958
959       USE_MM_LD_RUN_PATH
960         boolean The Red Hat perl MakeMaker distribution differs from the
961         standard upstream release in that it disables use of the MakeMaker
962         generated LD_RUN_PATH by default, UNLESS this attribute is specified
963         , or the USE_MM_LD_RUN_PATH environment variable is set during the
964         MakeMaker run.
965
966         The upstream MakeMaker will set the ld(1) environment variable
967         LD_RUN_PATH to the concatenation of every -L ld(1) option directory
968         in which a -l ld(1) option library is found, which is used as the
969         ld(1) -rpath option if none is specified. This means that, if your
970         application builds shared libraries and your MakeMaker application
971         links to them, that the absolute paths of the libraries in the build
972         tree will be inserted into the RPATH header of all MakeMaker gener‐
973         ated binaries, and that such binaries will be unable to link to these
974         libraries if they do not still reside in the build tree directories
975         (unlikely) or in the system library directories (/lib or /usr/lib),
976         regardless of any LD_LIBRARY_PATH setting. So if you specified
977         -L../mylib -lmylib , and
978          your 'libmylib.so' gets installed into /some_direc‐
979         tory_other_than_usr_lib,
980          your MakeMaker application will be unable to link to it, even if
981         LD_LIBRARY_PATH is set to include /some_directory_other_than_usr_lib,
982         because RPATH overrides LD_LIBRARY_PATH.
983
984         So for Red Hat MakeMaker builds LD_RUN_PATH is NOT generated by
985         default for every link. You can still use explicit -rpath ld options
986         or the LD_RUN_PATH environment variable during the build to generate
987         an RPATH for the binaries.
988
989         You can set the USE_MM_LD_RUN_PATH attribute to 1 on the MakeMaker
990         command line or in the WriteMakefile arguments to enable generation
991         of LD_RUN_PATH for every link command.
992
993         USE_MM_LD_RUN_PATH will default to 1 (LD_RUN_PATH will be used) IF
994         the $USE_MM_LD_RUN_PATH environment variable is set during a Make‐
995         Maker run.
996
997       VENDORPREFIX
998         Like PERLPREFIX, but only for the vendor install locations.
999
1000         Defaults to $Config{vendorprefixexp}.
1001
1002         Overridable by PREFIX
1003
1004       VERBINST
1005         If true, make install will be verbose
1006
1007       VERSION
1008         Your version number for distributing the package.  This defaults to
1009         0.1.
1010
1011       VERSION_FROM
1012         Instead of specifying the VERSION in the Makefile.PL you can let
1013         MakeMaker parse a file to determine the version number. The parsing
1014         routine requires that the file named by VERSION_FROM contains one
1015         single line to compute the version number. The first line in the file
1016         that contains the regular expression
1017
1018             /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/
1019
1020         will be evaluated with eval() and the value of the named variable
1021         after the eval() will be assigned to the VERSION attribute of the
1022         MakeMaker object. The following lines will be parsed o.k.:
1023
1024             $VERSION = '1.00';
1025             *VERSION = \'1.01';
1026             $VERSION = sprintf "%d.%03d", q$Revision: 4535 $ =~ /(\d+)/g;
1027             $FOO::VERSION = '1.10';
1028             *FOO::VERSION = \'1.11';
1029             our $VERSION = 1.2.3;       # new for perl5.6.0
1030
1031         but these will fail:
1032
1033             my $VERSION = '1.01';
1034             local $VERSION = '1.02';
1035             local $FOO::VERSION = '1.30';
1036
1037         (Putting "my" or "local" on the preceding line will work o.k.)
1038
1039         The file named in VERSION_FROM is not added as a dependency to Make‐
1040         file. This is not really correct, but it would be a major pain during
1041         development to have to rewrite the Makefile for any smallish change
1042         in that file. If you want to make sure that the Makefile contains the
1043         correct VERSION macro after any change of the file, you would have to
1044         do something like
1045
1046             depend => { Makefile => '$(VERSION_FROM)' }
1047
1048         See attribute "depend" below.
1049
1050       VERSION_SYM
1051         A sanitized VERSION with . replaced by _.  For places where . has
1052         special meaning (some filesystems, RCS labels, etc...)
1053
1054       XS
1055         Hashref of .xs files. MakeMaker will default this.  e.g.
1056
1057           {'name_of_file.xs' => 'name_of_file.c'}
1058
1059         The .c files will automatically be included in the list of files
1060         deleted by a make clean.
1061
1062       XSOPT
1063         String of options to pass to xsubpp.  This might include "-C++" or
1064         "-extern".  Do not include typemaps here; the TYPEMAP parameter
1065         exists for that purpose.
1066
1067       XSPROTOARG
1068         May be set to an empty string, which is identical to "-prototypes",
1069         or "-noprototypes". See the xsubpp documentation for details. Make‐
1070         Maker defaults to the empty string.
1071
1072       XS_VERSION
1073         Your version number for the .xs file of this package.  This defaults
1074         to the value of the VERSION attribute.
1075
1076       Additional lowercase attributes
1077
1078       can be used to pass parameters to the methods which implement that part
1079       of the Makefile.  Parameters are specified as a hash ref but are passed
1080       to the method as a hash.
1081
1082       clean
1083           {FILES => "*.xyz foo"}
1084
1085       depend
1086           {ANY_TARGET => ANY_DEPENDECY, ...}
1087
1088         (ANY_TARGET must not be given a double-colon rule by MakeMaker.)
1089
1090       dist
1091           {TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz',
1092           SHAR => 'shar -m', DIST_CP => 'ln', ZIP => '/bin/zip',
1093           ZIPFLAGS => '-rl', DIST_DEFAULT => 'private tardist' }
1094
1095         If you specify COMPRESS, then SUFFIX should also be altered, as it is
1096         needed to tell make the target file of the compression. Setting
1097         DIST_CP to ln can be useful, if you need to preserve the timestamps
1098         on your files. DIST_CP can take the values 'cp', which copies the
1099         file, 'ln', which links the file, and 'best' which copies symbolic
1100         links and links the rest. Default is 'best'.
1101
1102       dynamic_lib
1103           {ARMAYBE => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...'}
1104
1105       linkext
1106           {LINKTYPE => 'static', 'dynamic' or ''}
1107
1108         NB: Extensions that have nothing but *.pm files had to say
1109
1110           {LINKTYPE => ''}
1111
1112         with Pre-5.0 MakeMakers. Since version 5.00 of MakeMaker such a line
1113         can be deleted safely. MakeMaker recognizes when there's nothing to
1114         be linked.
1115
1116       macro
1117           {ANY_MACRO => ANY_VALUE, ...}
1118
1119       postamble
1120         Anything put here will be passed to MY::postamble() if you have one.
1121
1122       realclean
1123           {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
1124
1125       test
1126           {TESTS => 't/*.t'}
1127
1128       tool_autosplit
1129           {MAXLEN => 8}
1130
1131       Overriding MakeMaker Methods
1132
1133       If you cannot achieve the desired Makefile behaviour by specifying
1134       attributes you may define private subroutines in the Makefile.PL.  Each
1135       subroutine returns the text it wishes to have written to the Makefile.
1136       To override a section of the Makefile you can either say:
1137
1138               sub MY::c_o { "new literal text" }
1139
1140       or you can edit the default by saying something like:
1141
1142               package MY; # so that "SUPER" works right
1143               sub c_o {
1144                   my $inherited = shift->SUPER::c_o(@_);
1145                   $inherited =~ s/old text/new text/;
1146                   $inherited;
1147               }
1148
1149       If you are running experiments with embedding perl as a library into
1150       other applications, you might find MakeMaker is not sufficient. You'd
1151       better have a look at ExtUtils::Embed which is a collection of utili‐
1152       ties for embedding.
1153
1154       If you still need a different solution, try to develop another subrou‐
1155       tine that fits your needs and submit the diffs to "makemaker@perl.org"
1156
1157       For a complete description of all MakeMaker methods see ExtU‐
1158       tils::MM_Unix.
1159
1160       Here is a simple example of how to add a new target to the generated
1161       Makefile:
1162
1163           sub MY::postamble {
1164               return <<'MAKE_FRAG';
1165           $(MYEXTLIB): sdbm/Makefile
1166                   cd sdbm && $(MAKE) all
1167
1168           MAKE_FRAG
1169           }
1170
1171       The End Of Cargo Cult Programming
1172
1173       WriteMakefile() now does some basic sanity checks on its parameters to
1174       protect against typos and malformatted values.  This means some things
1175       which happened to work in the past will now throw warnings and possibly
1176       produce internal errors.
1177
1178       Some of the most common mistakes:
1179
1180       "MAN3PODS => ' '"
1181         This is commonly used to supress the creation of man pages.  MAN3PODS
1182         takes a hash ref not a string, but the above worked by accident in
1183         old versions of MakeMaker.
1184
1185         The correct code is "MAN3PODS => { }".
1186
1187       Hintsfile support
1188
1189       MakeMaker.pm uses the architecture specific information from Config.pm.
1190       In addition it evaluates architecture specific hints files in a
1191       "hints/" directory. The hints files are expected to be named like their
1192       counterparts in "PERL_SRC/hints", but with an ".pl" file name extension
1193       (eg. "next_3_2.pl"). They are simply "eval"ed by MakeMaker within the
1194       WriteMakefile() subroutine, and can be used to execute commands as well
1195       as to include special variables. The rules which hintsfile is chosen
1196       are the same as in Configure.
1197
1198       The hintsfile is eval()ed immediately after the arguments given to
1199       WriteMakefile are stuffed into a hash reference $self but before this
1200       reference becomes blessed. So if you want to do the equivalent to over‐
1201       ride or create an attribute you would say something like
1202
1203           $self->{LIBS} = ['-ldbm -lucb -lc'];
1204
1205       Distribution Support
1206
1207       For authors of extensions MakeMaker provides several Makefile targets.
1208       Most of the support comes from the ExtUtils::Manifest module, where
1209       additional documentation can be found.
1210
1211       make distcheck
1212           reports which files are below the build directory but not in the
1213           MANIFEST file and vice versa. (See ExtUtils::Manifest::fullcheck()
1214           for details)
1215
1216       make skipcheck
1217           reports which files are skipped due to the entries in the "MANI‐
1218           FEST.SKIP" file (See ExtUtils::Manifest::skipcheck() for details)
1219
1220       make distclean
1221           does a realclean first and then the distcheck. Note that this is
1222           not needed to build a new distribution as long as you are sure that
1223           the MANIFEST file is ok.
1224
1225       make manifest
1226           rewrites the MANIFEST file, adding all remaining files found (See
1227           ExtUtils::Manifest::mkmanifest() for details)
1228
1229       make distdir
1230           Copies all the files that are in the MANIFEST file to a newly cre‐
1231           ated directory with the name "$(DISTNAME)-$(VERSION)". If that
1232           directory exists, it will be removed first.
1233
1234           Additionally, it will create a META.yml module meta-data file in
1235           the distdir and add this to the distdir's MANFIEST.  You can shut
1236           this behavior off with the NO_META flag.
1237
1238       make disttest
1239           Makes a distdir first, and runs a "perl Makefile.PL", a make, and a
1240           make test in that directory.
1241
1242       make tardist
1243           First does a distdir. Then a command $(PREOP) which defaults to a
1244           null command, followed by $(TOUNIX), which defaults to a null com‐
1245           mand under UNIX, and will convert files in distribution directory
1246           to UNIX format otherwise. Next it runs "tar" on that directory into
1247           a tarfile and deletes the directory. Finishes with a command
1248           $(POSTOP) which defaults to a null command.
1249
1250       make dist
1251           Defaults to $(DIST_DEFAULT) which in turn defaults to tardist.
1252
1253       make uutardist
1254           Runs a tardist first and uuencodes the tarfile.
1255
1256       make shdist
1257           First does a distdir. Then a command $(PREOP) which defaults to a
1258           null command. Next it runs "shar" on that directory into a sharfile
1259           and deletes the intermediate directory again. Finishes with a com‐
1260           mand $(POSTOP) which defaults to a null command.  Note: For shdist
1261           to work properly a "shar" program that can handle directories is
1262           mandatory.
1263
1264       make zipdist
1265           First does a distdir. Then a command $(PREOP) which defaults to a
1266           null command. Runs "$(ZIP) $(ZIPFLAGS)" on that directory into a
1267           zipfile. Then deletes that directory. Finishes with a command
1268           $(POSTOP) which defaults to a null command.
1269
1270       make ci
1271           Does a $(CI) and a $(RCS_LABEL) on all files in the MANIFEST file.
1272
1273       Customization of the dist targets can be done by specifying a hash ref‐
1274       erence to the dist attribute of the WriteMakefile call. The following
1275       parameters are recognized:
1276
1277           CI           ('ci -u')
1278           COMPRESS     ('gzip --best')
1279           POSTOP       ('@ :')
1280           PREOP        ('@ :')
1281           TO_UNIX      (depends on the system)
1282           RCS_LABEL    ('rcs -q -Nv$(VERSION_SYM):')
1283           SHAR         ('shar')
1284           SUFFIX       ('.gz')
1285           TAR          ('tar')
1286           TARFLAGS     ('cvf')
1287           ZIP          ('zip')
1288           ZIPFLAGS     ('-r')
1289
1290       An example:
1291
1292           WriteMakefile( 'dist' => { COMPRESS=>"bzip2", SUFFIX=>".bz2" })
1293
1294       Module Meta-Data
1295
1296       Long plaguing users of MakeMaker based modules has been the problem of
1297       getting basic information about the module out of the sources without
1298       running the Makefile.PL and doing a bunch of messy heuristics on the
1299       resulting Makefile.  To this end a simple module meta-data file has
1300       been introduced, META.yml.
1301
1302       META.yml is a YAML document (see http://www.yaml.org) containing basic
1303       information about the module (name, version, prerequisites...)  in an
1304       easy to read format.  The format is developed and defined by the Mod‐
1305       ule::Build developers (see http://module-build.source
1306       forge.net/META-spec.html)
1307
1308       MakeMaker will automatically generate a META.yml file for you and add
1309       it to your MANIFEST as part of the 'distdir' target (and thus the
1310       'dist' target).  This is intended to seamlessly and rapidly populate
1311       CPAN with module meta-data.  If you wish to shut this feature off, set
1312       the "NO_META" "WriteMakefile()" flag to true.
1313
1314       Disabling an extension
1315
1316       If some events detected in Makefile.PL imply that there is no way to
1317       create the Module, but this is a normal state of things, then you can
1318       create a Makefile which does nothing, but succeeds on all the "usual"
1319       build targets.  To do so, use
1320
1321          ExtUtils::MakeMaker::WriteEmptyMakefile();
1322
1323       instead of WriteMakefile().
1324
1325       This may be useful if other modules expect this module to be built OK,
1326       as opposed to work OK (say, this system-dependent module builds in a
1327       subdirectory of some other distribution, or is listed as a dependency
1328       in a CPAN::Bundle, but the functionality is supported by different
1329       means on the current architecture).
1330
1331       Other Handy Functions
1332
1333       prompt
1334               my $value = prompt($message);
1335               my $value = prompt($message, $default);
1336
1337           The "prompt()" function provides an easy way to request user input
1338           used to write a makefile.  It displays the $message as a prompt for
1339           input.  If a $default is provided it will be used as a default.
1340           The function returns the $value selected by the user.
1341
1342           If "prompt()" detects that it is not running interactively and
1343           there is nothing on STDIN or if the PERL_MM_USE_DEFAULT environment
1344           variable is set to true, the $default will be used without prompt‐
1345           ing.  This prevents automated processes from blocking on user
1346           input.
1347
1348           If no $default is provided an empty string will be used instead.
1349

ENVIRONMENT

1351       PERL_MM_OPT
1352           Command line options used by "MakeMaker->new()", and thus by
1353           "WriteMakefile()".  The string is split on whitespace, and the
1354           result is processed before any actual command line arguments are
1355           processed.
1356
1357       PERL_MM_USE_DEFAULT
1358           If set to a true value then MakeMaker's prompt function will always
1359           return the default without waiting for user input.
1360
1361       PERL_CORE
1362           Same as the PERL_CORE parameter.  The parameter overrides this.
1363

SEE ALSO

1365       ExtUtils::MM_Unix, ExtUtils::Manifest ExtUtils::Install, ExtU‐
1366       tils::Embed
1367

AUTHORS

1369       Andy Dougherty "doughera@lafayette.edu", Andreas Koenig
1370       "andreas.koenig@mind.de", Tim Bunce "timb@cpan.org".  VMS support by
1371       Charles Bailey "bailey@newman.upenn.edu".  OS/2 support by Ilya
1372       Zakharevich "ilya@math.ohio-state.edu".
1373
1374       Currently maintained by Michael G Schwern "schwern@pobox.com"
1375
1376       Send patches and ideas to "makemaker@perl.org".
1377
1378       Send bug reports via http://rt.cpan.org/.  Please send your generated
1379       Makefile along with your report.
1380
1381       For more up-to-date information, see <http://www.makemaker.org>.
1382

LICENSE

1384       This program is free software; you can redistribute it and/or modify it
1385       under the same terms as Perl itself.
1386
1387       See <http://www.perl.com/perl/misc/Artistic.html>
1388
1389
1390
1391perl v5.8.8                       2001-09-21          ExtUtils::MakeMaker(3pm)
Impressum