ExtUtils::MakeMaker::Dist::Zilla::Develop - create bare-bones Makefile.PL files for use with dzil
version 0.02
# Makefile.PL use ExtUtils::MakeMaker::Dist::Zilla::Develop; WriteMakefile(NAME => 'Foo::Bar');
Dist::Zilla makes developing modules much easier by generating all kinds of boilerplate files, saving authors from having to write them by hand, but in some cases this can make developing more inconvenient. The most prominent example of this is with Makefile.PL files - although the majority of distributions can be hacked on just by editing the files in a source control checkout and using prove for testing, for some this isn't sufficient. In particular, distributions which use an auto-generated test suite and distributions which use XS both need special handling at build time before they will function, and with Dist::Zilla, this means running dzil build and rebuilding after every change. This is tedious!
Makefile.PL
prove
dzil build
This module provides an alternative. Create a minimal Makefile.PL in source control which handles just enough functionality for basic development (it can be as minimal as just what is in the "SYNOPSIS", but can also contain commands to generate your test suite, for example), and tell Dist::Zilla to replace it with a real Makefile.PL when you're actually ready to build a real distribution. To do this, make sure you're still using the MakeMaker plugin, either directly or through a pluginbundle like @Basic, and add this to your dist.ini:
dist.ini
[PruneFiles] filenames = Makefile.PL
In addition, this module also intercepts the install and dist rules in the generated Makefile to run the appropriate Dist::Zilla commands (dzil install and dzil build). This allows users to continue to use the perl Makefile.PL && make && make install set of commands, and have the correct thing continue to happen.
install
dist
dzil install
perl Makefile.PL && make && make install
Note that if you're using this module to ease testing of an XS distribution, you'll need to account for your module not containing a $VERSION statement (assuming you're using the PkgVersion plugin). To do this, you should use an XSLoader invocation similar to this:
$VERSION
BEGIN { XSLoader::load( 'Foo::Bar', $Foo::Bar::{VERSION} ? ${ $Foo::Bar::{VERSION} } : () ); }
This ensures that the $Foo::Bar::VERSION glob isn't created if it didn't exist initially, since this can confuse XSLoader.
$Foo::Bar::VERSION
No known bugs.
Please report any bugs through RT: email bug-extutils-makemaker-dist-zilla-develop at rt.cpan.org, or browse to http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ExtUtils-MakeMaker-Dist-Zilla-Develop.
bug-extutils-makemaker-dist-zilla-develop at rt.cpan.org
ExtUtils::MakeMaker
Dist::Zilla
You can find this documentation for this module with the perldoc command.
perldoc ExtUtils::MakeMaker::Dist::Zilla::Develop
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/ExtUtils-MakeMaker-Dist-Zilla-Develop
CPAN Ratings
http://cpanratings.perl.org/d/ExtUtils-MakeMaker-Dist-Zilla-Develop
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker-Dist-Zilla-Develop
Search CPAN
http://search.cpan.org/dist/ExtUtils-MakeMaker-Dist-Zilla-Develop
Jesse Luehrs <doy at tozt dot net>
This software is copyright (c) 2011 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install ExtUtils::MakeMaker::Dist::Zilla::Develop, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ExtUtils::MakeMaker::Dist::Zilla::Develop
CPAN shell
perl -MCPAN -e shell install ExtUtils::MakeMaker::Dist::Zilla::Develop
For more information on module installation, please visit the detailed CPAN module installation guide.