=head1 Building a Dist from Scratch Starting a distribution with Dist::Zilla is easy. It provides a system for "minting" new distributions, much like `h2xs`, L, or other similar tools. Unlike those, it is I customizable and can be made to do I more than just build a bunch of files for you to edit. =head2 Install Dist::Zilla For the tasks below, you'll want to: =for :list * install L, version 4.102342 or later * run C> The rest of this document assumes that you haven't made a custom minting profile, meaning that you haven't got anything in F<~/.dzil/profiles>. If you do, and the behavior you see isn't what's described below, you might want to move that directory out of the way, or read more about L. =head2 Run C It's easy: $ dzil new Your::Library [DZ] making target dir ./Your-Library [DZ] writing files to /Users/rjbs/tmp/Your-Library [DZ] dist minted in ./Your-Library If you haven't set up any special minting configuration, you'll have two files. F<./Your-Library/dist.ini>: #!vim dosini name = Your-Library author = E. Xavier Ample license = Perl_5 copyright_holder = E. Xavier Ample copyright_year = 2010 version = 0.001 [@Basic] F<./Your-Library/lib/Your/Library.pm> #!perl use strict; use warnings; package Your::Library; 1; There isn't a lot of other boilerplate, because the default minter assumes that you're going to go whole hog and use lots of plugins to build everything else you might need. It doesn't I those plugins to your F for you, though. The only plugins it I add are the ones in the L, so that the other C commands work. You'll have to choose the other plugins yourself. It's B that you understand what's in that "L<@Basic|Dist::Zilla::PluginBundle::Basic/DESCRIPTION>" bundle. That is almost the entire configuration that will be used to build your distribution. If you add more plugins that conflict with the ones in the basic bundle, but you had no idea what was in "@Basic", you will be confused. =head2 Write some code and some tests This bit is just like it would be with anything else: do the hard work that will make releasing the dist worthwhile. Dist::Zilla, sadly, will not write your code or your code's tests for you. You'll also want to write documentation, of course, but Dist::Zilla can help make that less painful. Choose an appropriate set of plugins, test, and release! =for cyoa ? prereq ? learn about declaring prerequisites ? writing-docs ? learn how Dist::Zilla helps you write docs ? testing ? learn how to test your distribution ? versioning ? learn about managing version numbers with Dist::Zilla ? release ? learn how to release your distribution to the CPAN ? minting-profile ? learn how to customize the minting process ? how-build-works ? learn about plugins and Dist::Zilla's build phases