NAME
Make::Build::Convert - Makefile.PL to Build.PL converter
SYNOPSIS
require Make::Build::Convert;
my %params = ( Path => '/path/to/perl/distribution',
Verbose => 2,
Use_Native_Order => 1,
Len_Indent => 4 );
my $make = Make::Build::Convert->new(%params);
$make->convert;
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 (part of the Perl core as of 5.10?)
The transition takes place slowly, as the converting process manually achieved is yet an uncommon practice. The Make::Build::Convert Makefile.PL parser is intended to ease the transition process.
CONSTRUCTOR
new
Optional arguments:
- Path
-
Path to a Perl distribution. Default: undef
- Makefile_PL
-
Filename of the Makefile script. Default: Makefile.PL
- Build_PL
-
Filename of the Build script. Default: Build.PL
- MANIFEST
-
Filename of the MANIFEST file. Default: MANIFEST
- Verbose
-
Verbose mode. If set to 1, overridden defaults and skipped arguments are printed while converting; if set to 2, output of
Verbose = 1
and created Build script will be printed. May be set via the make2build switches-v
(mode 1) and-vv
(mode 2). Default: 0 - 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
-n
. Default: 0 - Len_Indent
-
Indentation (character width). May be set via the make2build switch
-l
. Default: 3 - DD_Indent
-
Data::Dumper
indendation mode. Mode 0 will be disregarded in favor of 2. Default: 2 - DD_Sortkeys
-
Data::Dumper
sort keys. Default: 1
METHODS
convert
Parses the Makefile.PL's ExtUtils::MakeMaker
arguments and converts them to Module::Build
equivalents; subsequently the according Build.PL is created. Takes no arguments.
DATA SECTION
- Argument conversion
-
ExtUtils::MakeMaker
arguments followed by theirModule::Build
equivalents. Converted data structures preserve their native structure, that is,HASH
->HASH
, etc.NAME module_name DISTNAME dist_name ABSTRACT dist_abstract AUTHOR dist_author VERSION dist_version VERSION_FROM dist_version_from PREREQ_PM requires PM pm_files INSTALLDIRS installdirs DESTDIR destdir CCFLAGS extra_compiler_flags SIGN sign LICENSE license 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 preceedingly sorted arguments.module_name dist_name dist_abstract dist_author dist_version dist_version_from requires recommends build_requires conflicts pm_files installdirs destdir add_to_cleanup extra_compiler_flags sign license 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 byData::Dumper's
Dump()
and are then furtherly processed.
SEE ALSO
http://www.makemaker.org, ExtUtils::MakeMaker, Module::Build, http://www.makemaker.org/wiki/index.cgi?ModuleBuildConversionGuide
AUTHOR
Steven Schubiger <schubiger@cpan.org>