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.

ARGUMENTS

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.

$MANIFEST

The filename of the MANIFEST file. Defaults to MANIFEST.

$VERBOSE

Verbose mode. If set, created Build script will be printed to STDERR. 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
PM                    pm_files
CCFLAGS               extra_compiler_flags
SIGN                  sign
ABSTRACT              dist_abstract
AUTHOR                dist_author
clean->FILES          add_to_cleanup
default arguments

Module::Build default arguments may be specified as key / value pairs. Arguments attached to multidimensional structures are unsupported.

recommends	       HASH
build_requires        HASH
conflicts	       HASH
license               unknown
create_makefile_pl    passthrough

Value may be either a string or of type SCALAR, ARRAY, HASH.

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
requires
recommends
build_requires
conflicts
pm_files
extra_compiler_flags
sign
license
create_makefile_pl
dist_abstract
dist_author
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

AUTHOR

Steven Schubiger <sts@accognoscere.org>