Blame CONTRIBUTING.mkdn

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