pjf / pod-spell Goto Github PK
View Code? Open in Web Editor NEWThis project forked from perl-pod/pod-spell
Release history of Pod-Spell
Home Page: http://search.cpan.org/dist/Pod-Spell/
License: Other
This project forked from perl-pod/pod-spell
Release history of Pod-Spell
Home Page: http://search.cpan.org/dist/Pod-Spell/
License: Other
NAME Pod::Spell - a formatter for spellchecking Pod VERSION version 1.04 SYNOPSIS use Pod::Spell; Pod::Spell->new->parse_from_file( 'File.pm' ); Pod::Spell->new->parse_from_filehandle( $infile, $outfile ); Also look at podspell % perl -MPod::Spell -e "Pod::Spell->new->parse_from_file(shift)" Thing.pm |spell |fmt ...or instead of piping to spell or "ispell", use ">temp.txt", and open temp.txt in your word processor for spell-checking. DESCRIPTION Pod::Spell is a Pod formatter whose output is good for spellchecking. Pod::Spell rather like Pod::Text, except that it doesn't put much effort into actual formatting, and it suppresses things that look like Perl symbols or Perl jargon (so that your spellchecking program won't complain about mystery words like "$thing" or ""Foo::Bar"" or "hashref"). This class provides no new public methods. All methods of interest are inherited from Pod::Parser (which see). The especially interesting ones are "parse_from_filehandle" (which without arguments takes from STDIN and sends to STDOUT) and "parse_from_file". But you can probably just make do with the examples in the synopsis though. This class works by filtering out words that look like Perl or any form of computerese (like "$thing" or ""N>7"" or ""@{$foo}{'bar','baz'}"", anything in C<...> or F<...> codes, anything in verbatim paragraphs (code blocks), and anything in the stopword list. The default stopword list for a document starts out from the stopword list defined by Pod::Wordlist, and can be supplemented (on a per-document basis) by having "=for stopwords" / "=for :stopwords" region(s) in a document. METHODS new command interior_sequence textblock verbatim ADDING STOPWORDS You can add stopwords on a per-document basis with "=for stopwords" / "=for :stopwords" regions, like so: =for stopwords plok Pringe zorch snik !qux foo bar baz quux quuux This adds every word in that paragraph after "stopwords" to the stopword list, effective for the rest of the document. In such a list, words are whitespace-separated. (The amount of whitespace doesn't matter, as long as there's no blank lines in the middle of the paragraph.) Words beginning with "!" are *deleted* from the stopword list -- so "!qux" deletes "qux" from the stopword list, if it was in there in the first place. Note that if a stopword is all-lowercase, then it means that it's okay in *any* case; but if the word has any capital letters, then it means that it's okay *only* with *that* case. So a Wordlist entry of "perl" would permit "perl", "Perl", and (less interestingly) "PERL", "pERL", "PerL", et cetera. However, a Wordlist entry of "Perl" catches only "Perl", not "perl". So if you wanted to make sure you said only "Perl", never "perl", you could add this to the top of your document: =for stopwords !perl Perl Then all instances of the word "Perl" would be weeded out of the Pod::Spell-formatted version of your document, but any instances of the word "perl" would be left in (unless they were in a C<...> or F<...> style). You can have several "=for stopwords" regions in your document. You can even express them like so: =begin stopwords plok Pringe zorch snik !qux foo bar baz quux quuux =end stopwords If you want to use E<...> sequences in a "stopwords" region, you have to use ":stopwords", as here: =for :stopwords virtE<ugrave> ...meaning that you're adding a stopword of "virtù". If you left the ":" out, that would mean you were adding a stopword of "virtE<ugrave>" (with a literal E, a literal <, etc), which will have no effect, since any occurrences of virtE<ugrave> don't look like a normal human-language word anyway, and so would be screened out before the stopword list is consulted anyway. USING Pod::Spell My personal advice: * Write your documentation in Pod. Pod is described in perlpod. And perlmodstyle has some advice on content. This is the stage where you want to make sure you say everything you should, have good and working examples, and have coherent grammar. * Run it through podchecker. This will report all sorts of problems with your Pod; you may choose to ignore some of these problems. Some, like "*** WARNING: Unknown entity E<qacute>...", you should pay attention to. * Once podchecker errors have been tended to, spellcheck the pod by running it through podspell / Pod::Spell. For any misspellings that are reported in the Pod::Spell-formatted text, fix them in the original. Repeat until there's no complaints. * Run it through podchecker again just for good measure. SEE ALSO Pod::Wordlist Pod::Parser podchecker also known as Pod::Checker perlpod, perlpodspec HINT If you feed output of Pod::Spell into your word processor and run a spell-check, make sure you're *not* also running a grammar-check -- because Pod::Spell drops words that it thinks are Perl symbols, jargon, or stopwords, this means you'll have ungrammatical sentences, what with words being missing and all. And you don't need a grammar checker to tell you that. BUGS Please report any bugs or feature requests on the bugtracker website https://github.com/xenoterracide/pod-spell/issues When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. AUTHORS * Sean M. Burke <[email protected]> * Caleb Cushing <[email protected]> COPYRIGHT AND LICENSE This software is Copyright (c) 2013 by Caleb Cushing. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.