Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Comment on

( #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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (3)
    As of 2014-09-18 00:31 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (101 votes), past polls