NAME
Test::Pod::Spelling - A Test library to spell-check POD files
SYNOPSIS
use Test::Pod::Spelling;
add_stopwords(qw( Goddard inine ));
all_pod_files_spelling_ok();
done_testing();
use Test::Pod::Spelling (
spelling => {
allow_words => [qw[
Goddard LICENCE inline behaviour spelt
]]
},
);
};
pod_file_spelling_ok( 't/good.pod' );
all_pod_files_spelling_ok();
done_testing();
DESCRIPTION
This module exports two routines, described below, to test POD for spelling errors, using either Lingua::Ispell and Text::Aspell. One of those modules must be installed on your system, with their binaries, unless you plan to use the API to provide your own spell-checker.
As illustrated in "SYNOPSIS", above, configuration options for Pod::Spelling
can be passed when the module is used.
A list of words that can be allowed even if not in the dictionary (a stop list) can be supplied to the spell-checking module when this module is used, via "add_stopwords". To help keep this list short, common POD that would upset the spell-checker is skipped - see "TEXT NOT SPELL-CHECKED" in Pod::Spelling for details. No support is offered for inlining stoplists into Perl modules, which the author feels undermines testing. Patches to provide such an option will be applied, though, if required.
DEPENDENCIES
Test::Pod, Pod::Spelling, Test::Builder.
EXPORTS
all_pod_files_spelling_ok()
pod_file_spelling_ok()
EXPORTED SUBROUTINES
skip_paths_matching($re1 [, $reN])
Supply a list of one or more pre-compiled regular expressions to skip any file paths they match.
all_pod_files_spelling_ok( [@entries] )
Exactly the same as "all_pod_files_ok( [@entries] )" in Test::Pod except that it calls "pod_file_ok( FILENAME[, TESTNAME ] )" in Test::Pod to check the spelling of POD files.
pod_file_spelling_ok( FILENAME[, TESTNAME ] )
Exactly the same as "pod_file_ok( FILENAME[, TESTNAME ] )" in Test::Pod except that it checks the spelling of POD files.
add_stopwords( @words )
Adds a list of stop-words to those already being used by the spell-checker.
TODO
Automatically skip the name of the author as described in Makefile.PL or Build.PL or similar.
AUTHOR AND COPYRIGHT
Copyright Lee Goddard (C) 2011. All Rights Reserved.
Made available under the same terms as Perl.