Test::Spellunker(3)
πΈ NAME πΈ
okay bestie, welcome to Test::Spellunker(3) β a User Contributed Perl Documentation page that's literally here to check for spelling errors in POD files. no cap, that's the whole vibe. π
β¨ SYNOPSIS β¨
use Test::Spellunker;
all_pod_files_spelling_ok();
π FUNCTIONS π
okay so here are the functions, bestie. they're all pretty iconic in their own way. π«Ά
π§ 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. periodt.
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". cute, right? π
π¦ 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. lowkey important. β¨
A Perl file is:
- Any file that ends in
.PL,.pl,.plx,.pm,.podor.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. no cap, that's on you bestie. π
π add_stopwords(@words)
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. iconic behavior, honestly. π
π load_dictionary($filename_or_fh)
Load stopwords from $filename_or_fh. You may want to use it as load_dictionary(\*DATA). π«Ά
π«Ά HOW DO I ADD FILE SPECIFIC STOPWORDS? π«Ά
You can put it by following style POD annotation. bestie, just drop it in like this:
__END__
=for stopwords foo bar
=head1 NAME
...
π THANKS TO π
Inspired from Test::Spelling. And most of document was taken from Test::Spelling. giving credit where credit is due, periodt. β¨
and that's the page, bestie π β this one comes from perl v5.32.1, dated 2019-09-22, and it's the Test::Spellunker(3) manual. mwah π
π¦ where this page comes from
- epel 9: perl-Spellunker 0.4.0-16.el9 Β· GPL+ or Artistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms