New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to Dist::Zilla #5

wants to merge 14 commits into
base: master


None yet
1 participant

zakame commented Apr 13, 2018

This PR is a submission for my CPAN Pull Request Challenge this month. (link not ready yet, hopefully soon when Neil updates the site.)

This supersedes #3 to update the module authoring tooling from Module::Install to Dist::Zilla; please refer to its site for learning about its workflow.

To start, maintainers need to install Dist::Zilla and set up their global profile using dzil setup, and to install initial deps listed by dzil authordeps --missing. Then, the authoring process becomes something like this:

[do work: make changes, merge PRs, etc, then...]
dzil test        # run tests
dzil build       # build a dist in ./Math-Base36-$VERSION
dzil release     # build a dist, run release tests, push to CPAN, tag and push to GitHub

zakame added some commits Apr 13, 2018

Add a dist.ini
Start moving from Module::Install to Dist::Zilla.
Update stuff to be generated by Dist::Zilla
Makefile.PL and MANIFEST.SKIP are no longer needed in git, as these will
be remade by `dzil build` or `dzil release`.

Also touch .gitignore to ignore generated directories during `dzil`
Use dzil OurPkgVersion plugin to manage package version
This lets specifying the package version only once in dist.ini, to
cascade to both the module and Changes files.
Add NextRelease plugin to manage Changes file
This lets computing for the next version number and date be made
automatically upon `dzil release`.

Note that maintainers still have to supply the actual Changes text, as
it is not (yet) taken from the git log or other sources.
Add Git::NextVersion plugin to get the next version via tags
This dzil plugin can read the previous tag and compute the next version,
which can then be taken by other plugins (NextRelease and OurPkgVersion)
to use on the files being munged.
Track dependencies via cpanfile
Use Prereqs::FromCPANfile dzil plugin to read cpanfile when generating
Makefile.PL and CPAN::Meta data.
Use PodCoverageTest and PodSyntaxTests dzil plugins
Replace the old pod tests in git with ones supplied by these dzil
plugins.  As a side-effect, pod tests are now run via `dzil test
--author` (or in a dist directory made via `dzil build`.)
Add ReadmeFromPod dzil plugin
The default Readme plugin generates a text different from the original
README.  This dzil plugin reverts to this original, and can also
maintain the README when the corresponding pod source is updated.
Add GitHub dzil plugin
This dzil plugin maintains GitHub information (repo site and clone URL)
on CPAN::Meta files.

`bugs` setting is set to `false` in order to retain using the current RT
bugtracker instead of GitHub issues, which is this plugin's default;
maintainers can choose remove this line later.
use ReadmeAnyFromPod plugin instead of ReadmeFromPod
This is even better since it can generate a README directly on the
repo's root directory, instead of just inside of a `dzil build`.
Copy META.json from `dzil build`/`dzil release` into root
Ensure that there's a copy of CPAN::Meta data in the repo root, as this
along with cpanfile would allow modern CPAN clients like cpanm and cpm
to properly detect prereqs.
Use Git::GatherDir dzil plugin to ensure some files in root
Generated files like META.json and README.pod should be updated at `dzil
build` or `dzil release`, but not cause these to be re-included when
dzil gathers files.  This needs changing the `@basic` plugin bundle to
use Git::GatherDir to resolve this.
Add ContributorsFromGit dzil plugin
This adds contributors from this git repo into CPAN::Meta data.
Add MinimumPerl dzil plugin
This allows automatic checking for the minimum version of Perl this
module can run on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment