Dist::Zilla Like Chores

Just a post-ette today on the Dist:-Pen

A few more little plug-ins to add to my '.ini' today and again these are largely house-keeping chores and like all chores they are never fun to do and easy to ignore or bugger up.

What I am talking about are the Meta files that should be released with each distribution to be put on CPAN. The first files I am going to look at are Meta.yml and Meta.json which should both contain the same data but only differ in format. Sometimes I have made a mistake and forgotten to update one or the other or forgotten some important information in the file. Judging from this page so do many many others so automating their creation with Dist::Zilla will take one more thing off my plate.

All I have to do is add in the two plug-ins into may '.ini' MetaYAML and MetaJSON

die_on_existing_version = 1
die_on_line_insertion = 1

and after a quick 'dzil build'

If I poke around in my output folder I will see both

Build.PL dist.ini lib LICENSE Makefile.PL META.json META.yml

No real need for me to go look at the files but I did do a quick compare of the data in each and it was the same. Now with these plug-ins I will not appear on that page I linked to above.

Now the next plug-in automates another one of those dreary CPAN chores and that is creating a MANIFEST file something I know I have forgotten to update in the past. There are quite a few helpers out there to do this but they are only good if you remember to run them before you tar up you distribution adding in to the '.ini' means I never have to worry about it again.

So in goes the Mainfest plug-in


and another 'dzil build'

Build.PL dist.ini lib LICENSE Makefile.PL MANIFEST META.json META.yml t

and there she is.

I had a quick peek inside and one nice this the first line

# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.011.

and we know how the file was created.

So there are three chores I never have to worry about again.


Leave a comment

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations