Dist::Zilla Takes Instructions
YAP, Yet another Post-ette here at the Dist-Pen today.
There seem to be a never ending list of the chores that are involved with creating a distribution for CPAN. This is my eight post dealing with these little chores and hopefully the last in this vain. So today I am going to see if Dist::Zilla can help me with the README file.
This file normally contains detailed instructions on on how to install the module, not really requirement for a simple Moose module like mine, but something like DBD::Oracle, it uses XS and an external data driver, the README is essential. Anyway I always think it is a good Idea to have one.
Dist::Zill comes with a 'Readme' plug-in so lets give that a try first, by adding it into my '.ini' file;
…
[CheckChangesHasContent]
[PodWeaver]
++[Readme]
After a 'dizil build' in the output dir I get a README file with this content
This archive contains the distribution Database-Accessor,
version 0.01:
CRUD Interface for any DB
This software is Copyright (c) 2018 by John Scoles.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
This README file was generated by Dist::Zilla::Plugin::Readme v6.011.
Ok it delivers as promised a 'very simple' readme. Lets have a quick look at another plug-in I had my eye on Dist::Zilla::Plugin::Readme::Brief. This one is not a standard plug-in so I had to install it,took a little while, and looking at some of its attributes I think I will use it like this
…
[CheckChangesHasContent]
[PodWeaver]
[Readme::Brief]
installer = mb
installer = eumm
The above should add in both the directions for Make::Maker and Build, and after a quick 'clean' and 'build' I get my README file and in it I see my nice description from the POD, the Copyrint and Licene info at the bottom and in the middle this;
INSTALLATION
This is a Perl module distribution. It should be installed with whichever
tool you use to manage your installation of Perl, e.g. any of
cpanm .
cpan .
cpanp -i .
Consult http://www.cpan.org/modules/INSTALL.html for further instruction.
Should you wish to install this module manually, the procedure is
perl Build.PL
./Build
./Build test
./Build install
or
perl Makefile.PL
make
make test
make install
A nice set of installation instructions so I think I am going to go with this one.
As a final note there is Dist::Zilla::Plugin::InstallGuide if you have a very complex installation process you might want to look at that one.
Leave a comment