1 package ExtUtils::MakeMaker::Dist::Zilla::Develop;
3 $ExtUtils::MakeMaker::Dist::Zilla::Develop::AUTHORITY = 'cpan:DOY';
6 $ExtUtils::MakeMaker::Dist::Zilla::Develop::VERSION = '0.03';
10 # ABSTRACT: create bare-bones Makefile.PL files for use with dzil
12 use ExtUtils::MakeMaker ();
17 ********************************* WARNING **********************************
19 This module uses Dist::Zilla for development. This Makefile.PL will let you
20 run the tests, but you are encouraged to install Dist::Zilla and the needed
21 plugins if you intend on doing any serious hacking.
23 ****************************************************************************
27 ExtUtils::MakeMaker->export_to_level(1, @_);
31 package # hide from PAUSE
36 $message = <<'MESSAGE';
38 ********************************* ERROR ************************************
40 This module uses Dist::Zilla for development. This Makefile.PL will let you
41 run the tests, but should not be used for installation or building dists.
42 Building a dist should be done with 'dzil build', installation should be
43 done with 'dzil install', and releasing should be done with 'dzil release'.
45 ****************************************************************************
48 $message =~ s/^(.*)$/\t\$(NOECHO) echo "$1";/mg;
55 \t\$(NOECHO) echo "Running dzil install for you...";
56 \t\$(NOECHO) dzil install
64 \t\$(NOECHO) echo "Running dzil build for you...";
65 \t\$(NOECHO) dzil build
79 ExtUtils::MakeMaker::Dist::Zilla::Develop - create bare-bones Makefile.PL files for use with dzil
88 use ExtUtils::MakeMaker::Dist::Zilla::Develop;
89 WriteMakefile(NAME => 'Foo::Bar');
93 L<Dist::Zilla> makes developing modules much easier by generating all kinds of
94 boilerplate files, saving authors from having to write them by hand, but in
95 some cases this can make developing more inconvenient. The most prominent
96 example of this is with C<Makefile.PL> files - although the majority of
97 distributions can be hacked on just by editing the files in a source control
98 checkout and using C<prove> for testing, for some this isn't sufficient. In
99 particular, distributions which use an auto-generated test suite and
100 distributions which use XS both need special handling at build time before they
101 will function, and with Dist::Zilla, this means running C<dzil build> and
102 rebuilding after every change. This is tedious!
104 This module provides an alternative. Create a minimal C<Makefile.PL> in source
105 control which handles just enough functionality for basic development (it can
106 be as minimal as just what is in the L</SYNOPSIS>, but can also contain
107 commands to generate your test suite, for example), and tell Dist::Zilla to
108 replace it with a real C<Makefile.PL> when you're actually ready to build a
109 real distribution. To do this, make sure you're still using the
110 L<MakeMaker|Dist::Zilla::Plugin::MakeMaker> plugin, either directly or through
111 a pluginbundle like L<@Basic|Dist::Zilla::PluginBundle::Basic>, and add the
112 C<exclude_filename = Makefile.PL> option to your F<dist.ini> where you use
115 In addition, this module also intercepts the C<install> and C<dist> rules in
116 the generated Makefile to run the appropriate Dist::Zilla commands
117 (C<dzil install> and C<dzil build>). This allows users to continue to use the
118 C<perl Makefile.PL && make && make install> set of commands, and have the
119 correct thing continue to happen.
121 Note that if you're using this module to ease testing of an XS distribution,
122 you'll need to account for your module not containing a C<$VERSION> statement
123 (assuming you're using the L<PkgVersion|Dist::Zilla::Plugin::PkgVersion>
124 plugin). To do this, you should use an XSLoader invocation similar to this:
129 $Foo::Bar::{VERSION} ? ${ $Foo::Bar::{VERSION} } : ()
133 This ensures that the C<$Foo::Bar::VERSION> glob isn't created if it didn't
134 exist initially, since this can confuse XSLoader.
140 Please report any bugs to GitHub Issues at
141 L<https://github.com/doy/extutils-makemaker-dist-zilla-develop/issues>.
145 L<ExtUtils::MakeMaker>
151 You can find this documentation for this module with the perldoc command.
153 perldoc ExtUtils::MakeMaker::Dist::Zilla::Develop
155 You can also look for information at:
161 L<https://metacpan.org/release/ExtUtils-MakeMaker-Dist-Zilla-Develop>
165 L<https://github.com/doy/extutils-makemaker-dist-zilla-develop>
167 =item * RT: CPAN's request tracker
169 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker-Dist-Zilla-Develop>
173 L<http://cpanratings.perl.org/d/ExtUtils-MakeMaker-Dist-Zilla-Develop>
179 Jesse Luehrs <doy@tozt.net>
181 =head1 COPYRIGHT AND LICENSE
183 This software is copyright (c) 2014 by Jesse Luehrs.
185 This is free software; you can redistribute it and/or modify it under
186 the same terms as the Perl 5 programming language system itself.