Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
We all know that perl documentation is often full of typos. I know, certainly, that my modules are. :-) I usually didn't spell check my modules because it was a relatively painful process: first, convert the POD to plain text; then, check it with a spell checker; finally, make sure that the real typos don't get lost among the many false positives.

Today I noticed that a module that simplifies this task has been available for years: Pod::Spell. It comes with a program called "podspell" that extracts the POD, converts it to text, and removes everything that should be code, such as verbatim blocks and words tagged with C<>. It also removes many common words related to Perl and programming, so that they don't get flagged as errors by your spell checker. The whole process gets reduced to something like

podspell My/Module.pm | spell

(assuming you have the "spell" program).

But even that is not enough. I know that this kind of thing won't get done unless it's automated. I would like to include a spelling check in my test suite. To do that, I just wrote Test::Spelling. Now I just need to add a small test file, call it something like "t/spell.t", and

make test

will complain if there are any typos. Of course, the stopword list in the test file has to be kept up to date so that the test doesn't report failures.

Test::Spelling is my first testing module, and is heavily based in Test::Pod. For more information, see the documentation for Test::Spelling.


In reply to Improve the speling for you moduels documention by itub

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-20 00:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found