1Perl::Critic::Policy::DUosceurmeCPnoetnratltr:ii:obCnur:ti:etPdiocdP:Se:prPelolllDiiocncygu:(m:3eD)notcautmieonntation::PodSpelling(3)
2
3
4
7 Perl::Critic::Policy::Documentation::PodSpelling - Check your spelling.
8
10 This Policy is part of the core Perl::Critic distribution.
11
13 Did you write the documentation? Check.
14
15 Did you document all of the public methods? Check.
16
17 Is your documentation readable? Hmm...
18
19 Ideally, we'd like Perl::Critic to tell you when your documentation is
20 inadequate. That's hard to code, though. So, inspired by
21 Test::Spelling, this module checks the spelling of your POD. It does
22 this by pulling the prose out of the code and passing it to an external
23 spell checker. It skips over words you flagged to ignore. If the
24 spell checker returns any misspelled words, this policy emits a
25 violation.
26
27 If anything else goes wrong -- you don't have Pod::Spell installed or
28 we can't locate the spell checking program or (gasp!) your module has
29 no POD -- then this policy passes.
30
31 To add exceptions on a module-by-module basis, add "stopwords" as
32 described in Pod::Spell. For example:
33
34 =for stopword gibbles
35
36 =head1 Gibble::Manip -- manipulate your gibbles
37
38 =cut
39
41 This policy can be configured to tell which spell checker to use or to
42 set a global list of spelling exceptions. To do this, put entries in a
43 .perlcriticrc file like this:
44
45 [Documentation::PodSpelling]
46 spell_command = aspell list
47 stop_words = gibbles foobar
48 stop_words_file = some/path/with/stop/words.txt
49
50 The default spell command is "aspell list" and it is interpreted as a
51 shell command. We parse the individual arguments via Text::ParseWords
52 so feel free to use quotes around your arguments. If the executable
53 path is an absolute file name, it is used as-is. If it is a relative
54 file name, we employ File::Which to convert it to an absolute path via
55 the "PATH" environment variable. As described in Pod::Spell and
56 Test::Spelling, the spell checker must accept text on STDIN and print
57 misspelled words one per line on STDOUT.
58
59 You can specify global stop words via the "stop_words" and
60 "stop_words_file" options. The former is simply split up on
61 whitespace. The latter is looked at line by line, with anything after
62 an octothorp ("#") removed and then leading and trailing whitespace
63 removed. Silly example valid file contents:
64
65 # It's a comment!
66
67 foo
68 arglbargl # Some other comment.
69 bar
70
71 The values from "stop_words" and "stop_words_file" are merged together
72 into a single list of exemptions.
73
75 Pod::Spell is not included with Perl::Critic, nor is a spell checking
76 program.
77
79 This policy will disable itself if any of the following are
80 unavailable: File::Which, IO::String, Pod::Spell, or Text::ParseWords.
81
83 Initial development of this policy was supported by a grant from the
84 Perl Foundation.
85
87 Chris Dolan <cdolan@cpan.org>
88
90 Copyright (c) 2007-2009 Chris Dolan. Many rights reserved.
91
92 This program is free software; you can redistribute it and/or modify it
93 under the same terms as Perl itself. The full text of this license can
94 be found in the LICENSE file included with this module
95
96
97
98perl v5.10.1 Perl::C2r0i1t0i-c1:1:-P1o2licy::Documentation::PodSpelling(3)