NAME
make2build - create a Build.PL derived from Makefile.PL
SYNOPSIS
./make2build.pl # In the root directory of an
# ExtUtils::MakeMaker based distribution
DESCRIPTION
ExtUtils::MakeMaker has been a de-facto standard for the common distribution of Perl modules; Module::Build is expected to supersede ExtUtils::MakeMaker in some time.
The transition takes place slowly, as the converting process manually achieved is yet an uncommon practice. This Makefile.PL parser is intended to ease the transition process.
OPTIONS
Globals
$MAKEFILE_PL
-
The filename of the Makefile script. Defaults to Makefile.PL.
$BUILD_PL
-
The filename of the Build script. Defaults to Build.PL.
$DEBUG
-
Debugging. If set, created Build script will be printed to STDOUT. Defaults to 0.
$LEN_INDENT
-
Indentation (character width). Defaults to 3.
$DD_INDENT
-
Data::Dumper indendation mode. Mode 0 will be disregarded in favor of 2. Defaults to 2.
$DD_SORTKEYS
-
Data::Dumper sort keys. Defaults to 1.
Data section
- argument conversion
-
ExtUtils::MakeMaker arguments followed by their Module::Build equivalents. Converted data structures preserve their native structure, i.e. HASH -> HASH, etc.
NAME module_name DISTNAME dist_name VERSION dist_version VERSION_FROM dist_version_from PREREQ_PM requires
- default arguments
-
Module::Build default arguments may be specified as key / value pairs. Arguments attached to multidimensional structures are unsupported.
license perl create_makefile_pl passthrough
- sorting order
-
Module::Build arguments are sorted as enlisted herein. Additional arguments, that don't occur herein, are lower prioritized and will be inserted in unsorted order after preceedeingly sorted arguments.
module_name dist_name dist_version dist_version_from license requires create_makefile_pl
- begin code
-
Code that preceeds converted Module::Build arguments.
use Module::Build; my $b = Module::Build->new $INDENT(
- end code
-
Code that follows converted Module::Build arguments.
$INDENT); $b->create_build_script;
INTERNALS
- co-opting WriteMakefile()
-
In order to convert arguments, a typeglob from WriteMakefile() to an internal sub will be set; subsequently Makefile.PL will be executed and the arguments are then accessible to the internal sub.
- Data::Dumper
-
Converted ExtUtils::MakeMaker arguments will be dumped by Data::Dumper's
Dump()
and are then furtherly processed.
SEE ALSO
ExtUtils::MakeMaker, Module::Build, http://www.makemaker.org/wiki/index.cgi?ModuleBuildConversionGuide