Blame CONTRIBUTING.mkdn

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