Blame CONTRIBUTING.mkdn

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