ModuleBuildConversionGuide


This is intended as a guide for people wanting to convert from MakeMaker's Makefile.PL to Module::Build's Build.PL. More details can be found in the Module::Build documentation.

/Files/
----
Makefile.PL Build.PL
lib/ lib/ (other locations supported if you list *.pm files explicitly)
Foo.xs lib/Foo.xs
MANIFEST MANIFEST
MANIFEST.SKIP MANIFEST.SKIP
/Parameters/
----
NAME module_name
VERSION dist_version
VERSION_FROM dist_version_from (not required, determined from module_name)
PREREQ_PM requires (version specification more rich)
PREFIX install_base (heuristics different, see docs for details)
LIB install_path=lib
INSTALLMAN1DIR install_path=bindoc
INSTALLMAN3DIR install_path=libdoc
INSTALLDIRS installdirs
DESTDIR destdir
/Targets/
----
test test
install install
dist dist
disttest disttest

Additional important Module::Build parameters

* license: distribution license. Usually just 'perl'
* recommends: Like 'requires' but these dependencies are not mandatory.

Unsupported Features

There are several features which MakeMaker supports, but which Module::Build does not support. Sometimes, Module::Build has deliberately decided not to support these features. In other cases, folks just haven't gotten around to implementing them.

Recursive Builds

By default, MakeMaker recursively traverses the directory structure rooted at the current Makefile.PL, and builds all other Makefile.PL files it finds (snipping off branches without Makefile.PL's). Module::Build does not do this yet. The preferred way of building larger projects is to build a lib/ tree and install it with a single Makefile.PL or Build.PL script.

Module::Build::Convert

It is recommended, to convert existing Makefile.PL's by using make2build, Module::Build::Convert's frontend. http://search.cpan.org/search?query=Module%3A%3ABuild%3A%3AConvert&mode=all buy movies

Comments

This kwiki needs to be upgraded so formatting works inside of a table. --MarkStosberg