Blame README.mkdn

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