Test::Spellunker - check for spelling errors in POD files
use Test::Spellunker; all_pod_files_spelling_ok();
- all_pod_files_spelling_ok( [@files/@directories] )
Checks all the files for POD spelling. It gathers all_pod_files() on each file/directory, and declares a "plan" in Test::More for you (one test for each file), so you must not call "plan" yourself.
If @files is empty, the function finds all POD files in the blib directory; or the lib, bin and scripts directories if blib does not exist. A POD file is one that ends with .pod, .pl, .plx, or .pm; or any file where the first line looks like a perl shebang line.
If you're testing a distribution, just create a t/pod-spell.t with the code in the "SYNOPSIS".
Returns true if every POD file has correct spelling, or false if any of them fail. This function will show any spelling errors as diagnostics.
- pod_file_spelling_ok( $filename[, $testname ] )
"pod_file_spelling_ok" will test that the given POD file has no spelling errors.
When it fails, "pod_file_spelling_ok" will show any spelling errors as diagnostics.
The optional second argument is the name of the test. If it is omitted, "pod_file_spelling_ok" chooses a default test name "POD spelling for $filename".
- all_pod_files( [@dirs] )
Returns a list of all the Perl files in each directory and its subdirectories, recursively. If no directories are passed, it defaults to blib if blib exists, or else lib if not. Skips any files in CVS or .svn directories.
A Perl file is:
Any file that ends in .PL, .pl, .plx, .pm, .pod or .t. Any file that has a first line with a shebang and "perl" on it.
Furthermore, files for which the filter set by "set_pod_file_filter" return false are skipped. By default, this filter passes everything through.
The order of the files returned is machine-dependent. If you want them sorted, you'll have to sort them yourself.
Add words that should be skipped by the spellcheck. Note that Pod::Spell already skips words believed to be code, such as everything in verbatim (indented) blocks and code marked up with ""..."", as well as some common Perl jargon.
Load stopwords from
$filename_or_fh. You may want to use it as
You can put it by following style POD annotation.
__END__ =for stopwords foo bar =head1 NAME ...