Skip to content
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

Open
wants to merge 14 commits into
base: master
from
Open

Convert to Dist::Zilla #5

wants to merge 14 commits into from

Conversation

@zakame
Copy link
Contributor

@zakame 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 14 commits Apr 13, 2018
Start moving from Module::Install to 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`
runs.
This lets specifying the package version only once in dist.ini, to
cascade to both the module and Changes files.
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.
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.
Use Prereqs::FromCPANfile dzil plugin to read cpanfile when generating
Makefile.PL and CPAN::Meta data.
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`.)
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.
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.
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`.
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.
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.
This adds contributors from this git repo into CPAN::Meta data.
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.