Packaging

I'm using Module::Build to package the source code for Daizu. The usual way of doing this is to write a Build.PL script, which is a description of your package in Perl code. It generates an opaque Perl script called Build which you can run to build and test it, and a YAML file containing metadata, called META.yml.

I thought it would make more sense to write the metadata in a parseable format and have everything else built out of that, so as an experiment that's what I've done for Daizu. The distribution should still build in the normal way if you're just installing it.

So I have a hand-written META.yml file (spec), and a simple script called mkbuild.pl which creates the Build.PL file from that. I just have to run that before creating the distribution tarball. It should be possible to take mkbuild.pl and use it on other projects, but let me know if you have to make any changes to make it more generic.

There's another script I wrote to help in packaging, called chkmanifest.pl, which checks to make sure that all the files present in your source directory are listed in the MANIFEST file, and that it is properly formatted. It knows to ignore certain things described in MANIFEST.SKIP. I wrote this after many times forgetting to add new files, so now I just have to get into the habit of running it reasonably often as I'm working. This script should also be fairly generic, so you can use it on other projects.

The process of building a distribution tarball is described separately in the Release procedure.