Module::Install::StandardTests - generate standard tests for installation
use inc::Module::Install; name 'Class-Null'; all_from 'lib/Class/Null.pm'; use_test_base; use_standard_tests; auto_include; WriteAll;
Writes a few standard test files to the test directory t/.
t/
use_standard_tests; use_standard_tests(without => 'pod_coverage'); use_standard_tests(without => [ qw/pod_coverage perl_critic/ ]);
Adds a few requirements to the build process, then simply calls the write_standard_test_* methods one after the other.
write_standard_test_*
If you pass a named argument called without, the the tests corresponding to the value (as a string) or values (as an array reference) are omitted. Possible values are:
without
Writes the t/000_standard__compile.t file, which uses Test::Compile to check that all perl module files compile. If Test::Compile is not available, the tests are skipped.
t/000_standard__compile.t
Writes the t/000_standard__perl_critic.t file, which uses Test::Perl::Critic to criticise Perl source code for best practices. If Test::Perl::Critic is not available, the tests are skipped.
t/000_standard__perl_critic.t
If there is a t/perlcriticrc file, it is used as the Perl::Critic configuration.
t/perlcriticrc
Writes the t/000_standard__pod.t file, which uses Test::Pod to check for POD errors in files. If Test::Pod is not available, the tests are skipped.
t/000_standard__pod.t
Writes the t/000_standard__pod_coverage.t file, which uses Test::Pod::Coverage to check for POD coverage in the distribution. If Test::Pod::Coverage is not available, the tests are skipped.
t/000_standard__pod_coverage.t
$self->write_test_file('000_standard__perl_critic.t', q/.../);
Writes the code into the specified file inside the t/ directory. The shebang line, together with use warnings; and use strict; are prepended to the code.
use warnings;
use strict;
No bugs have been reported.
Please report any bugs or feature requests to bug-module-install-standardtests@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-module-install-standardtests@rt.cpan.org
See perlmodinstall for information and options on installing Perl modules.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you. Or see <http://www.perl.com/CPAN/authors/id/M/MA/MARCEL/>.
Marcel Grünauer, <marcel@cpan.org>
<marcel@cpan.org>
Copyright 2007 by Marcel Grünauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Module::Install::StandardTests, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::Install::StandardTests
CPAN shell
perl -MCPAN -e shell install Module::Install::StandardTests
For more information on module installation, please visit the detailed CPAN module installation guide.