Blame CONTRIBUTING.mkdn

Packit cc7393
## HOW TO CONTRIBUTE
Packit cc7393
Packit cc7393
Thank you for considering contributing to this distribution.  This file
Packit cc7393
contains instructions that will help you work with the source code.
Packit cc7393
Packit cc7393
The distribution is managed with Dist::Zilla.  This means than many of the
Packit cc7393
usual files you might expect are not in the repository, but are generated at
Packit cc7393
release time, as is much of the documentation.  Some generated files are
Packit cc7393
kept in the repository as a convenience (e.g. Makefile.PL or cpanfile).
Packit cc7393
Packit cc7393
Generally, **you do not need Dist::Zilla to contribute patches**.  You do need
Packit cc7393
Dist::Zilla to create a tarball.  See below for guidance.
Packit cc7393
Packit cc7393
### Getting dependencies
Packit cc7393
Packit cc7393
If you have App::cpanminus 1.6 or later installed, you can use `cpanm` to
Packit cc7393
satisfy dependencies like this:
Packit cc7393
Packit cc7393
    $ cpanm --installdeps .
Packit cc7393
Packit cc7393
Otherwise, look for either a `Makefile.PL` or `cpanfile` file for
Packit cc7393
a list of dependencies to satisfy.
Packit cc7393
Packit cc7393
### Running tests
Packit cc7393
Packit cc7393
You can run tests directly using the `prove` tool:
Packit cc7393
Packit cc7393
    $ prove -l
Packit cc7393
    $ prove -lv t/some_test_file.t
Packit cc7393
Packit cc7393
For most of my distributions, `prove` is entirely sufficient for you to test any
Packit cc7393
patches you have. I use `prove` for 99% of my testing during development.
Packit cc7393
Packit cc7393
### Code style and tidying
Packit cc7393
Packit cc7393
Please try to match any existing coding style.  If there is a `.perltidyrc`
Packit cc7393
file, please install Perl::Tidy and use perltidy before submitting patches.
Packit cc7393
Packit cc7393
If there is a `tidyall.ini` file, you can also install Code::TidyAll and run
Packit cc7393
`tidyall` on a file or `tidyall -a` to tidy all files.
Packit cc7393
Packit cc7393
### Patching documentation
Packit cc7393
Packit cc7393
Much of the documentation Pod is generated at release time.  Some is
Packit cc7393
generated boilerplate; other documentation is built from pseudo-POD
Packit cc7393
directives in the source like C<=method> or C<=func>.
Packit cc7393
Packit cc7393
If you would like to submit a documentation edit, please limit yourself to
Packit cc7393
the documentation you see.
Packit cc7393
Packit cc7393
If you see typos or documentation issues in the generated docs, please
Packit cc7393
email or open a bug ticket instead of patching.
Packit cc7393
Packit cc7393
### Installing and using Dist::Zilla
Packit cc7393
Packit cc7393
Dist::Zilla is a very powerful authoring tool, optimized for maintaining a
Packit cc7393
large number of distributions with a high degree of automation, but it has a
Packit cc7393
large dependency chain, a bit of a learning curve and requires a number of
Packit cc7393
author-specific plugins.
Packit cc7393
Packit cc7393
To install it from CPAN, I recommend one of the following approaches for
Packit cc7393
the quickest installation:
Packit cc7393
Packit cc7393
    # using CPAN.pm, but bypassing non-functional pod tests
Packit cc7393
    $ cpan TAP::Harness::Restricted
Packit cc7393
    $ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla
Packit cc7393
Packit cc7393
    # using cpanm, bypassing *all* tests
Packit cc7393
    $ cpanm -n Dist::Zilla
Packit cc7393
Packit cc7393
In either case, it's probably going to take about 10 minutes.  Go for a walk,
Packit cc7393
go get a cup of your favorite beverage, take a bathroom break, or whatever.
Packit cc7393
When you get back, Dist::Zilla should be ready for you.
Packit cc7393
Packit cc7393
Then you need to install any plugins specific to this distribution:
Packit cc7393
Packit cc7393
    $ cpan `dzil authordeps`
Packit cc7393
    $ dzil authordeps | cpanm
Packit cc7393
Packit cc7393
Once installed, here are some dzil commands you might try:
Packit cc7393
Packit cc7393
    $ dzil build
Packit cc7393
    $ dzil test
Packit cc7393
    $ dzil xtest
Packit cc7393
Packit cc7393
You can learn more about Dist::Zilla at http://dzil.org/
Packit cc7393