Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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/ | 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

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (3)
    As of 2017-12-16 06:24 GMT
    Find Nodes?
      Voting Booth?
      What programming language do you hate the most?

      Results (449 votes). Check out past polls.