From ff8fc09bae20ac71b7ff02f378608923e2df8a84 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 10 Jan 2011 16:13:38 -0600 Subject: add docs --- lib/ExtUtils/MakeMaker/Dist/Zilla/Develop.pm | 100 +++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/lib/ExtUtils/MakeMaker/Dist/Zilla/Develop.pm b/lib/ExtUtils/MakeMaker/Dist/Zilla/Develop.pm index 6c3e8ee..2f9da79 100644 --- a/lib/ExtUtils/MakeMaker/Dist/Zilla/Develop.pm +++ b/lib/ExtUtils/MakeMaker/Dist/Zilla/Develop.pm @@ -1,9 +1,65 @@ package ExtUtils::MakeMaker::Dist::Zilla::Develop; use strict; use warnings; +# ABSTRACT: create bare-bones Makefile.PL files for use with dzil use ExtUtils::MakeMaker (); +=head1 SYNOPSIS + + # Makefile.PL + use ExtUtils::MakeMaker::Dist::Zilla::Develop; + WriteMakefile(NAME => 'Foo::Bar'); + +=head1 DESCRIPTION + +L 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 C files - although the majority of +distributions can be hacked on just by editing the files in a source control +checkout and using C 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 C and +rebuilding after every change. This is tedious! + +This module provides an alternative. Create a minimal C in source +control which handles just enough functionality for basic development (it can +be as minimal as just what is in the L, but can also contain +commands to generate your test suite, for example), and tell Dist::Zilla to +replace it with a real C when you're actually ready to build a +real distribution. To do this, make sure you're still using the +L plugin, either directly or through +a pluginbundle like L<@Basic|Dist::Zilla::PluginBundle::Basic>, and add this to +your C: + + [PruneFiles] + filenames = Makefile.PL + +In addition, this module also intercepts the C and C rules in +the generated Makefile to run the appropriate Dist::Zilla commands +(C and C). This allows users to continue to use the +C set of commands, and have the +correct thing continue to happen. + +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 C<$VERSION> statement +(assuming you're using the L +plugin). To do this, you should use an XSLoader invocation similar to this: + + BEGIN { + XSLoader::load( + 'Foo::Bar', + $Foo::Bar::{VERSION} ? ${ $Foo::Bar::{VERSION} } : () + ); + } + +This ensures that the C<$Foo::Bar::VERSION> glob isn't created if it didn't +exist initially, since this can confuse XSLoader. + +=cut + sub import { warn <<'EOF'; @@ -61,4 +117,48 @@ EOF } } +=head1 BUGS + +No known bugs. + +Please report any bugs through RT: email +C, or browse to +L. + +=head1 SEE ALSO + +L + +L + +=head1 SUPPORT + +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: + +=over 4 + +=item * AnnoCPAN: Annotated CPAN documentation + +L + +=item * CPAN Ratings + +L + +=item * RT: CPAN's request tracker + +L + +=item * Search CPAN + +L + +=back + +=cut + 1; -- cgit v1.2.3-54-g00ecf