.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" 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 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. . \" 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 "Module::Build::Convert 3" .TH Module::Build::Convert 3 "2008-01-07" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" Module::Build::Convert \- Makefile.PL to Build.PL converter .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Module::Build::Convert; .Ve .PP .Vb 5 \& # example arguments (empty %args is sufficient too) \& %args = (Path => '/path/to/perl/distribution(s)', \& Verbose => 2, \& Use_Native_Order => 1, \& Len_Indent => 4); .Ve .PP .Vb 2 \& $make = Module::Build::Convert->new(%args); \& $make->convert; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`ExtUtils::MakeMaker\*(C'\fR has been a de-facto standard for the common distribution of Perl modules; \f(CW\*(C`Module::Build\*(C'\fR is expected to supersede \f(CW\*(C`ExtUtils::MakeMaker\*(C'\fR in some time (part of the Perl core as of 5.9.4). .PP The transition takes place slowly, as the converting process manually achieved is yet an uncommon practice. The Module::Build::Convert \fIMakefile.PL\fR parser is intended to ease the transition process. .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" .Sh "new" .IX Subsection "new" Options: .ie n .IP "* ""Path""" 4 .el .IP "* \f(CWPath\fR" 4 .IX Item "Path" Path to a Perl distribution. May point to a single distribution directory or to one containing more than one distribution. Default: \f(CW''\fR .ie n .IP "* ""Makefile_PL""" 4 .el .IP "* \f(CWMakefile_PL\fR" 4 .IX Item "Makefile_PL" Filename of the Makefile script. Default: \fIMakefile.PL\fR .ie n .IP "* ""Build_PL""" 4 .el .IP "* \f(CWBuild_PL\fR" 4 .IX Item "Build_PL" Filename of the Build script. Default: \fIBuild.PL\fR .ie n .IP "* ""MANIFEST""" 4 .el .IP "* \f(CWMANIFEST\fR" 4 .IX Item "MANIFEST" Filename of the \s-1MANIFEST\s0 file. Default: \fI\s-1MANIFEST\s0\fR .ie n .IP "* ""RC""" 4 .el .IP "* \f(CWRC\fR" 4 .IX Item "RC" Filename of the \s-1RC\s0 file. Default: \fI.make2buildrc\fR .ie n .IP "* ""Dont_Overwrite_Auto""" 4 .el .IP "* \f(CWDont_Overwrite_Auto\fR" 4 .IX Item "Dont_Overwrite_Auto" If a Build.PL already exists, output a notification and ask whether it should be overwritten. Default: 1 .ie n .IP "* ""Create_RC""" 4 .el .IP "* \f(CWCreate_RC\fR" 4 .IX Item "Create_RC" Create a \s-1RC\s0 file in the homedir of the current user. Default: 0 .ie n .IP "* ""Parse_PPI""" 4 .el .IP "* \f(CWParse_PPI\fR" 4 .IX Item "Parse_PPI" Parse the Makefile.PL in the \s-1PPI\s0 Parser mode. Default: 0 .ie n .IP "* ""Exec_Makefile""" 4 .el .IP "* \f(CWExec_Makefile\fR" 4 .IX Item "Exec_Makefile" Execute the Makefile.PL via \f(CW'do Makefile.PL'\fR. Default: 0 .ie n .IP "* ""Verbose""" 4 .el .IP "* \f(CWVerbose\fR" 4 .IX Item "Verbose" Verbose mode. If set to 1, overridden defaults and skipped arguments are printed while converting; if set to 2, output of \f(CW\*(C`Verbose = 1\*(C'\fR and created Build script will be printed. May be set via the make2build switches \f(CW\*(C`\-v\*(C'\fR (mode 1) and \f(CW\*(C`\-vv\*(C'\fR (mode 2). Default: 0 .ie n .IP "* ""Debug""" 4 .el .IP "* \f(CWDebug\fR" 4 .IX Item "Debug" Rudimentary debug facility for examining the parsing process. Default: 0 .ie n .IP "* ""Process_Code""" 4 .el .IP "* \f(CWProcess_Code\fR" 4 .IX Item "Process_Code" Process code embedded within the arguments list. Default: 0 .ie n .IP "* ""Use_Native_Order""" 4 .el .IP "* \f(CWUse_Native_Order\fR" 4 .IX Item "Use_Native_Order" Native sorting order. If set to 1, the native sorting order of the Makefile arguments will be tried to preserve; it's equal to using the make2build switch \f(CW\*(C`\-n\*(C'\fR. Default: 0 .ie n .IP "* ""Len_Indent""" 4 .el .IP "* \f(CWLen_Indent\fR" 4 .IX Item "Len_Indent" Indentation (character width). May be set via the make2build switch \f(CW\*(C`\-l\*(C'\fR. Default: 3 .ie n .IP "* ""DD_Indent""" 4 .el .IP "* \f(CWDD_Indent\fR" 4 .IX Item "DD_Indent" \&\f(CW\*(C`Data::Dumper\*(C'\fR indendation mode. Mode 0 will be disregarded in favor of 2. Default: 2 .ie n .IP "* ""DD_Sortkeys""" 4 .el .IP "* \f(CWDD_Sortkeys\fR" 4 .IX Item "DD_Sortkeys" \&\f(CW\*(C`Data::Dumper\*(C'\fR sort keys. Default: 1 .SH "METHODS" .IX Header "METHODS" .Sh "convert" .IX Subsection "convert" Parses the \fIMakefile.PL\fR's \f(CW\*(C`WriteMakefile()\*(C'\fR arguments and converts them to \f(CW\*(C`Module::Build\*(C'\fR equivalents; subsequently the according \fIBuild.PL\fR is created. Takes no arguments. .SH "DATA SECTION" .IX Header "DATA SECTION" .Sh "Argument conversion" .IX Subsection "Argument conversion" \&\f(CW\*(C`ExtUtils::MakeMaker\*(C'\fR arguments followed by their \f(CW\*(C`Module::Build\*(C'\fR equivalents. Converted data structures preserve their native structure, that is, \f(CW\*(C`HASH\*(C'\fR \-> \f(CW\*(C`HASH\*(C'\fR, etc. .PP .Vb 19 \& NAME module_name \& DISTNAME dist_name \& ABSTRACT dist_abstract \& AUTHOR dist_author \& VERSION dist_version \& VERSION_FROM dist_version_from \& PREREQ_PM requires \& PL_FILES PL_files \& PM pm_files \& MAN1PODS pod_files \& XS xs_files \& INC include_dirs \& INSTALLDIRS installdirs \& DESTDIR destdir \& CCFLAGS extra_compiler_flags \& EXTRA_META meta_add \& SIGN sign \& LICENSE license \& clean.FILES @add_to_cleanup .Ve .Sh "Default arguments" .IX Subsection "Default arguments" \&\f(CW\*(C`Module::Build\*(C'\fR default arguments may be specified as key/value pairs. Arguments attached to multidimensional structures are unsupported. .PP .Vb 6 \& #build_requires HASH \& #recommends HASH \& #conflicts HASH \& license unknown \& create_readme 1 \& create_makefile_pl traditional .Ve .PP Value may be either a string or of type \f(CW\*(C`SCALAR, ARRAY, HASH\*(C'\fR. .Sh "Sorting order" .IX Subsection "Sorting order" \&\f(CW\*(C`Module::Build\*(C'\fR arguments are sorted as enlisted herein. Additional arguments, that don't occur herein, are lower prioritized and will be inserted in unsorted order after preceedingly sorted arguments. .PP .Vb 24 \& module_name \& dist_name \& dist_abstract \& dist_author \& dist_version \& dist_version_from \& requires \& build_requires \& recommends \& conflicts \& PL_files \& pm_files \& pod_files \& xs_files \& include_dirs \& installdirs \& destdir \& add_to_cleanup \& extra_compiler_flags \& meta_add \& sign \& license \& create_readme \& create_makefile_pl .Ve .Sh "Begin code" .IX Subsection "Begin code" Code that preceeds converted \f(CW\*(C`Module::Build\*(C'\fR arguments. .PP .Vb 2 \& use strict; \& use warnings; .Ve .PP .Vb 1 \& use Module::Build; .Ve .PP .Vb 1 \& $MAKECODE .Ve .PP .Vb 2 \& my $b = Module::Build->new \& $INDENT( .Ve .Sh "End code" .IX Subsection "End code" Code that follows converted \f(CW\*(C`Module::Build\*(C'\fR arguments. .PP .Vb 1 \& $INDENT); .Ve .PP .Vb 1 \& $b->create_build_script; .Ve .PP .Vb 1 \& $MAKECODE .Ve .SH "INTERNALS" .IX Header "INTERNALS" .ie n .Sh "co-opting ""WriteMakefile()""" .el .Sh "co-opting \f(CWWriteMakefile()\fP" .IX Subsection "co-opting WriteMakefile()" This behavior is no longer the default way to receive \fIWriteMakefile()\fR's arguments; the Makefile.PL is now statically parsed unless one forces manually the co-opting of \fIWriteMakefile()\fR. .PP In order to convert arguments, a typeglob from \f(CW\*(C`WriteMakefile()\*(C'\fR to an internal sub will be set; subsequently Makefile.PL will be executed and the arguments are then accessible to the internal sub. .Sh "Data::Dumper" .IX Subsection "Data::Dumper" Converted \f(CW\*(C`ExtUtils::MakeMaker\*(C'\fR arguments will be dumped by \&\f(CW\*(C`Data::Dumper's\*(C'\fR \f(CW\*(C`Dump()\*(C'\fR and are then furtherly processed. .SH "BUGS & CAVEATS" .IX Header "BUGS & CAVEATS" \&\f(CW\*(C`Module::Build::Convert\*(C'\fR should be considered experimental as the parsing of the Makefile.PL doesn't necessarily return valid arguments, especially for Makefiles with bad or even worse, missing intendation. .PP The parsing process may sometimes hang with or without warnings in such cases. Debugging by using the appropriate option/switch (see CONSTRUCTOR/new) may reveal the root cause. .SH "SEE ALSO" .IX Header "SEE ALSO" , ExtUtils::MakeMaker, Module::Build, .SH "AUTHOR" .IX Header "AUTHOR" Steven Schubiger .SH "LICENSE" .IX Header "LICENSE" This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. .PP See