Adventures with Dist::Zilla - 1
I don't have the huge range of CPAN modules that some people are herding, so it may be thought that I don't need the substantial set of automation that others require to keep their interactions with PAUSE/CPAN under control.
However since I have to interact with PAUSE fairly rarely, as well as do the "pull everything together into a coherence CPAN release" dance infrequently, automating the whole process so I have fewer changes to get it wrong seems appealing.
I initially looked at Dist::Zilla a while back, but was having trouble getting my head round it properly. Although splitting the whole thing down into small plugins is great as a way of handling features, it can create problems when wanting to find out how to do things, or even finding out best practices, just because you have to locate the right plugin or plugin bundle from the huge selection. This isn't helped by the documentation - which appears to require some knowledge which I appear to be missing.
However, spurred on by the YAPC::EU talk I dived into converting the first of my distributions. Catalyst::Authentication::Credential::RemoteHTTP is a small module, and so hopefully easy to convert.
I decided to initially steal from Florian and use his Dist::Zilla::PluginBundle::FLORA plugin bundle - this needed a few config overrides (since I am not him), but appeared to be a great start. I then happily set about deleting chunks of boilerplate and the Module::Release code I was previously using.
A couple of attempted test builds showed that everything worked... almost...
I prefer the main module pod in README format to the default minimal README - and theres a module to do that... Dist::Zilla::Plugin::ReadmeFromPod.
Additionally I wanted the git tagging functionality - so another plugin bundle was added (Dist::Zilla::PluginBundle::Git) - the config on this is due to me changing tagging style to match a couple of internal projects.
So far that has led me to lose quite a number of lines - the two github commits can be found here and here. I am fairly happy with the current form other than a few smallish points:-
- I would like the additional project info - bug tracker etc - to be in the POD. Its a bit superfluous there, but I feel its best to give people every opportunity to file bugs, see source etc
- I have lost a couple of distribution tests - for example MANIFEST checking. Maybe I don't need these, but for now would be more comfortable with them...
I think its now time for a few more experiments, and then I intend to pull this together by building a customised plugin bundle with my own policy in it - this also gives me a chance to attempt some more Moose and to get a feel for Dist::Zilla internals.
For manifest tests and other tests, you might like to use something like my pluginbundle does:
http://search.cpan.org/perldoc?Dist::Zilla::PluginBundle::MARCEL
which contains:
I've also written several test-related Dist::Zilla plugins, see http://search.cpan.org/~marcel/
Marcel