Module::Build::Convert

Steven Schubiger


Table of Contents

Common distribution "skeleton"
Module::Build successor of ExtUtils::MakeMaker?
Module::Build distribution "skeleton"
Module::Build::Convert's state of operation
Data section
Argument conversion
Default arguments
Sorting order
Begin code
End code
make2build basic usage
make2build switches

Copyright (c) 2005-2008 Steven Schubiger

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Common distribution "skeleton"

It has been common practice within the Perl community for ages to ship distributions with a Makefile.PL so that the user will be able to install the packages when he retrieves them either via the shell which the CPAN/CPANPLUS modules offer or via manual CPAN download.

The Makefile.PL consists of "meta information" which in the case of the distribution HTML::Tagset looks as follows:

Example 1. 

# This -*-perl-*- program writes the Makefile for installing this distribution.
#
# See "perldoc perlmodinstall" or "perldoc ExtUtils::MakeMaker" for
# info on how to control how the installation goes.

require 5.004;
use strict;
use ExtUtils::MakeMaker;

WriteMakefile(
    NAME            => 'HTML::Tagset',
    AUTHOR          => 'Andy Lester <andy@petdance.com>',
    VERSION_FROM    => 'Tagset.pm', # finds $VERSION
    ABSTRACT_FROM   => 'Tagset.pm', # retrieve abstract from module
    PMLIBDIRS       => [qw(lib/)],
    dist            => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
    clean           => { FILES => 'HTML-Tagset-*' },
);

Of interest are the arguments to WriteMakefile(), because they influence what Makefile is being written by ExtUtils::MakeMaker after the user has invoked the usual build & install procedure including the subsequent commands:

Example 2. 

% perl Makefile.PL
% make
% make test
# make install