package Dist::Zilla::PluginBundle::TestingMania; # ABSTRACT: test your dist with every testing plugin conceivable use strict; use warnings; use 5.010001; # We use the smart match operator our $VERSION = '0.15'; # VERSION use Moose; use namespace::autoclean; with 'Dist::Zilla::Role::PluginBundle::Easy'; sub configure { my $self = shift; my %plugins = ( 'Test::CPAN::Changes' => $self->config_slice('changelog'), 'Test::CPAN::Meta::JSON'=> 1, # prunes itself if META.json isn't there 'Test::Pod::LinkCheck' => 1, 'Test::Version' => 1, 'Test::Compile' => 1, 'Test::Perl::Critic' => $self->config_slice('critic_config'), 'Test::DistManifest' => 1, 'Test::EOL' => 1, 'Test::Kwalitee' => 1, MetaTests => 1, # should only be loaded if MetaYAML is loaded, or the file exists in the dist 'Test::MinimumVersion' => 1, MojibakeTests => 1, NoTabsTests => 1, PodCoverageTests => 1, PodSyntaxTests => 1, 'Test::Portability' => 1, 'Test::Synopsis' => 1, 'Test::UnusedVars' => 1, ); my @include = (); my @disable = $self->payload->{disable} ? split(/, ?/, $self->payload->{disable}) : (); foreach my $plugin (keys %plugins) { next if ( # Skip... $plugin ~~ @disable or # plugins they asked to skip $plugin ~~ @include or # plugins we already included !$plugins{$plugin} # plugins in the list, but which we don't want to add ); push(@include, ref $plugins{$plugin} ? [ $plugin => $plugins{$plugin} ] : $plugin); } my @enable = $self->payload->{enable} ? split(/, ?/, $self->payload->{enable}) : (); foreach my $plugin (@enable) { next unless $plugin ~~ %plugins; # Skip the plugin unless it is in the list of actual testing plugins push(@include, $plugin) unless ($plugin ~~ @include or $plugin ~~ @disable); } $self->add_plugins(@include); } __PACKAGE__->meta->make_immutable(); no Moose; 1; __END__ =pod =encoding utf-8 =head1 NAME Dist::Zilla::PluginBundle::TestingMania - test your dist with every testing plugin conceivable =head1 VERSION version 0.15 =head1 SYNOPSIS In F: [@TestingMania] =head1 DESCRIPTION This plugin bundle collects all the testing plugins for L which exist (and are not deprecated). This is for the most paranoid people who want to test their dist seven ways to Sunday. Simply add the following near the end of F: [@TestingMania] =head2 Testing plugins =over 4 =item * L, which performs tests to syntax check your dist. =item * L, which checks your code against best practices. See L and L for details. You can set a perlcritic config file: [@TestingMania] critic_config = perlcriticrc =item * L, which tests F for correctness. See L for details. =item * L, which ensures the correct line endings are used (and also checks for trailing whitespace). See L for details. =item * L, which tests that your dist has version numbers, and that they are valid. See L for exactly what that means. =item * L, which performs some basic kwalitee checks. I is an automatically-measurable guage of how good your software is. It bears only a B resemblance to the human-measurable guage of actual quality. See L for a description of the tests. =item * L, which performs some extra tests on F. See L for what that means. =item * L, which performs some extra tests on F, if it exists. See L for what that means. =item * L, which tests for the minimum required version of perl. See L for details, including limitations. =item * L, which tests for the correct source/documentation character encoding. =item * L, which ensures you don't use I. See L for details. If you wish to exclude this plugin, see L. =item * L, which checks that you have Pod documentation for the things you should have it for. See L for what that means. =item * L, which checks that your Pod is well-formed. See L and L for details. =item * L, which performs some basic tests to ensure portability of file names. See L for what that means. =item * L, which does syntax checking on the code from your SYNOPSIS section. See L for details and limitations. =item * L, which checks your dist for unused variables. See L for details. =item * L, which checks the links in your POD. See L for details. =item * L, which checks your changelog for conformance with L. See L for details. Set C in F if you don't use F: [@TestingMania] changelog = CHANGELOG =back =head2 Disabling Tests To exclude a testing plugin, give a comma-separated list in F: [@TestingMania] disable = Test::DistManifest,Test::Kwalitee =head2 Enabling Tests This pluginbundle may have some testing plugins that aren't enabled by default. This option allows you to turn them on. Attempting to add plugins which are not listed above will have I. To enable a testing plugin, give a comma-separated list in F: [@TestingMania] enable = Test::Compile =for test_synopsis 1; __END__ =for Pod::Coverage configure =head1 AVAILABILITY The project homepage is L. The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit L to find a CPAN site near you, or see L. The development version lives at L and may be cloned from L. Instead of sending patches, please fork this project using the standard git and github infrastructure. =head1 SOURCE The development version is on github at L and may be cloned from L =head1 BUGS AND LIMITATIONS No bugs have been reported. Please report any bugs or feature requests through the web interface at L. =head1 AUTHOR Mike Doherty =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by Mike Doherty. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut