NAME
Module::Install::StandardTests - generate standard tests for installation
SYNOPSIS
use inc::Module::Install;
name 'Class-Null';
all_from 'lib/Class/Null.pm';
use_test_base;
use_standard_tests;
auto_include;
WriteAll;
DESCRIPTION
Writes a few standard test files to the test directory t/
.
FUNCTIONS
- use_standard_tests
-
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.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:- compile
- pod
- pod_coverage
- perl_critic
- write_standard_test_compile
-
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. - write_standard_test_perl_critic
-
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.If there is a
t/perlcriticrc
file, it is used as the Perl::Critic configuration. - write_standard_test_pod
-
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. - write_standard_test_pod_coverage
-
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. - write_test_file($filename, $code)
-
$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 withuse warnings;
anduse strict;
are prepended to the code.
BUGS AND LIMITATIONS
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.
INSTALLATION
See perlmodinstall for information and options on installing Perl modules.
AVAILABILITY
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/>.
AUTHOR
Marcel Grünauer, <marcel@cpan.org>
COPYRIGHT AND LICENSE
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.