ExtUtils::ModuleMaker version 0.43 is now available on CPAN ( ExtUtils::ModuleMaker is a replacement for the most typical use of the h2xs utility bundled with all Perl distributions: the creation of the directories and files required for a pure-Perl module to be installable with make and distributable on CPAN.

A companion distribution, ExtUtils::ModuleMaker::PBP, version 0.08, is also now available and is described below.


ExtUtils::ModuleMaker was created by R Geoffrey Avery in 2001. I took over maintenance of the distribution in July 2005. The central focus of ExtUtils::ModuleMaker remains unchanged, as do its modalities. The recommended way to get started with ExtUtils::ModuleMaker is the modulemaker command-line utility which prompts the user to enter a module name and other information and then creates the directories and files needed to bring that module to life. modulemaker is extremely easy for novice module authors to use and, as such, typifies the Perl virtue of laziness. The user can also provide modulemaker with command-line arguments. ExtUtils::ModuleMaker can also be called from within a Perl program via its new() and complete_build() methods.

In the past three months, however, there have been significant enhancements to ExtUtils::ModuleMaker's functionality as well as improvements to the distribution itself.

New Options

Fourteen new attributes have been added to ExtUtils::ModuleMaker's default values. Five of these provide the user with more fine-grained control over the directories and files created by running ExtUtils::ModuleMaker:


Eight of the new default values provide the user with greater control over which test files to include, how to name them and how many modules each test file tests:


Finally, a new default value is provided to enable the user to save selections made via modulemaker as new default values:


By enabling the user to save his/her selections as new default values, the latest version of ExtUtils::ModuleMaker significantly enhances the user's ability to customize its use.

But wait, there's more!

Improved Subclassability

While ExtUtils::ModuleMaker always was subclassable, its subclassability is now easier and better documented. ExtUtils::ModuleMaker's default values and private methods, formerly found entirely in 'lib/ExtUtils/', have been moved into three separate packages based on functionality:


Private methods called within ExtUtils::ModuleMaker::new() are found in Private methods within ExtUtils::ModuleMaker::complete_build() are found within A potential subclasser's attention is therefore more precisely focused on the methods needing overriding.


As an illustration of how to subclass ExtUtils::ModuleMaker, I have written a companion Perl extension, ExtUtils::ModuleMaker::PBP, also now available on CPAN, which you can use to create the skeleton for a Perl extension in the manner recommended by Damian Conway in his recent book Perl Best Practices (O'Reilly, 2005) ExtUtils::ModuleMaker::PBP includes its own command-line utility, mmkrpbp, which works in the same way as modulemaker.

The net effect of these enhancements is to create a comfortable learning curve for the ExtUtils::ModuleMaker user.

But wait, there's still more!

Structural Improvements

As a CPAN distribution ExtUtils::ModuleMaker has been significantly improved with the addition of new tests and documentation. As measured by Devel::Cover, ExtUtils::ModuleMaker's test coverage is now very high. Only the modulemaker utility's interactive mode lacks good coverage.

In particular, the test suite tests to see whether a file containing new default values can be saved in an appropriate location on the user's system and whether such a file, when used, generates values expected to override ExtUtils::ModuleMaker's own default values. In the event that a user is upgrading from one version of ExtUtils::ModuleMaker to another, the test suite also makes certain to leave intact and file of default values the user has already saved on disk so that it is still intact after the upgrade.

During the testing process, new directories and files are now created in temporary directories which are created and then erased via File::Temp.

ExtUtils::ModuleMaker itself is intended to be backwardly compatible with Perl 5.5, but most of its test suite requires Perl 5.6. The tests which require 5.6 are all wrapped in SKIP blocks, so 5.5 users should be able to test and install the distribution with no problem.


Acknowlegements go out to:


Please report any bugs or feature requests to, or through the web interface at