.\" Automatically generated by Pod::Man version 1.15 .\" Sun Jan 25 04:58:46 2004 .\" .\" Standard preamble: .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used .\" to do unbreakable dashes and therefore won't be available. \*(C` and .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and .\" index entries marked with X<> in POD. Of course, you'll have to process .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ====================================================================== .\" .IX Title "blib::lib::Module::Build::Compat 3" .TH blib::lib::Module::Build::Compat 3 "perl v5.6.1" "2004-01-25" "User Contributed Perl Documentation" .UC .SH "NAME" Module::Build::Compat \- Compatibility with ExtUtils::MakeMaker .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 7 \& # In a Build.PL : \& use Module::Build; \& my $build = Module::Build->new \& ( module_name => 'Foo::Bar', \& license => 'perl', \& create_makefile_pl => 'passthrough' ); \& ... .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Because ExtUtils::MakeMaker has been the standard way to distribute modules for a long time, many tools (\s-1CPAN\s0.pm, or your system administrator) may expect to find a working Makefile.PL in every distribution they download from \s-1CPAN\s0. If you want to throw them a bone, you can use Module::Build::Compat to automatically generate a Makefile.PL for you, in one of several different styles. .PP Module::Build::Compat also provides some code that helps out the Makefile.PL at runtime. .SH "METHODS" .IX Header "METHODS" .RS 0 .RE .Ip "create_makefile_pl( \f(CW$style\fR, \f(CW$build\fR )" 4 .IX Item "create_makefile_pl( $style, $build )" Creates a Makefile.PL in the current directory in one of several styles, based on the supplied Module::Build object \f(CW\*(C`$build\*(C'\fR. This is typically controlled by passing the desired style as the \&\f(CW\*(C`create_makefile_pl\*(C'\fR parameter to Module::Build's \f(CW\*(C`new()\*(C'\fR method; the Makefile.PL will then be automatically created during the \&\f(CW\*(C`distdir\*(C'\fR action. .Sp The currently supported styles are: .RS 4 .Ip "small" 4 .IX Item "small" A small Makefile.PL will be created that passes all functionality through to the Build.PL script in the same directory. The user must already have Module::Build installed in order to use this, or else they'll get a module-not-found error. .Ip "passthrough" 4 .IX Item "passthrough" This is just like the \f(CW\*(C`small\*(C'\fR option above, but if Module::Build is not already installed on the user's system, the script will offer to use \f(CW\*(C`CPAN.pm\*(C'\fR to download it and install it before continuing with the build. .Ip "traditional" 4 .IX Item "traditional" A Makefile.PL will be created in the \*(L"traditional\*(R" style, i.e. it will use \f(CW\*(C`ExtUtils::MakeMaker\*(C'\fR and won't rely on \f(CW\*(C`Module::Build\*(C'\fR at all. In order to create the Makefile.PL, we'll include the \f(CW\*(C`requires\*(C'\fR and \&\f(CW\*(C`build_requires\*(C'\fR dependencies as the \f(CW\*(C`PREREQ_PM\*(C'\fR parameter. .Sp You don't want to use this style if during the \f(CW\*(C`perl Build.PL\*(C'\fR stage you ask the user questions, or do some auto-sensing about the user's environment, or if you subclass Module::Build to do some customization, because the vanilla Makefile.PL won't do any of that. .RE .RS 4 .RE .Ip "run_build_pl( args => \e@ARGV )" 4 .IX Item "run_build_pl( args => @ARGV )" This method runs the Build.PL script, passing it any arguments the user may have supplied to the \f(CW\*(C`perl Makefile.PL\*(C'\fR command. Because ExtUtils::MakeMaker and Module::Build accept different arguments, this method also performs some translation between the two. .Sp \&\f(CW\*(C`run_build_pl()\*(C'\fR accepts the following named parameters: .RS 4 .Ip "args" 4 .IX Item "args" The \f(CW\*(C`args\*(C'\fR parameter specifies the parameters that would usually appear on the command line of the \f(CW\*(C`perl Makefile.PL\*(C'\fR command \- typically you'll just pass a reference to \f(CW\*(C`@ARGV\*(C'\fR. .Ip "script" 4 .IX Item "script" This is the filename of the script to run \- it defaults to \f(CW\*(C`Build.PL\*(C'\fR. .RE .RS 4 .RE .Ip "\fIwrite_makefile()\fR" 4 .IX Item "write_makefile()" This method writes a 'dummy' Makefile that will pass all commands through to the corresponding Module::Build actions. .Sp \&\f(CW\*(C`write_makefile()\*(C'\fR accepts the following named parameters: .RS 4 .Ip "makefile" 4 .IX Item "makefile" The name of the file to write \- defaults to the string \f(CW\*(C`Makefile\*(C'\fR. .RE .RS 4 .RE .RE .RS 0 .SH "SCENARIOS" .IX Header "SCENARIOS" So, some common scenarios are: .RS 0 .RE .Ip "1." 4 Just include a Build.PL script (without a Makefile.PL script), and give installation directions in a \s-1README\s0 or \s-1INSTALL\s0 document explaining how to install the module. In particular, explain that the user must install Module::Build before installing your module. I prefer this method, mainly because I believe that the woes and hardships of doing this are far less significant than most people would have you believe. It's also the simplest method, which is nice. But anyone with an older version of \s-1CPAN\s0 or \s-1CPANPLUS\s0 on their system will probably have problems installing your module with it. .Ip "2." 4 Include a Build.PL script and a \*(L"traditional\*(R" Makefile.PL, created either manually or with \fIcreate_makefile_pl()\fR. Users won't ever have to install Module::Build, but in truth it's difficult to create a proper Makefile.PL .Ip "3." 4 Include a Build.PL script and a \*(L"pass-through\*(R" Makefile.PL built using Module::Build::Compat. This will mean that people can continue to use the \*(L"old\*(R" installation commands, and they may never notice that it's actually doing something else behind the scenes. .RE .RS 0 .SH "AUTHOR" .IX Header "AUTHOR" Ken Williams, ken@mathforum.org .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIModule::Build\fR\|(3), \fIExtUtils::MakeMaker\fR\|(3)