Blame CONTRIBUTING.mkdn

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