Pod-Spell-1.27/000755 000766 000024 00000000000 14705245775 013544 5ustar00gknopstaff000000 000000 Pod-Spell-1.27/LICENSE000644 000766 000024 00000021524 14705245775 014555 0ustar00gknopstaff000000 000000 This software is Copyright (c) 2024 by Olivier Mengué. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Pod-Spell-1.27/bin/000755 000766 000024 00000000000 14705245775 014314 5ustar00gknopstaff000000 000000 Pod-Spell-1.27/CONTRIBUTING000644 000766 000024 00000021717 14705245775 015406 0ustar00gknopstaff000000 000000 Checklist (and a short version for the impatient): Commits: * make sure that you have tests for the bug you are fixing * make sure that the test suite passes after your commit. This distribution is built with Dist::Zilla ensure that running `dzil test` passes. You are responsible for ensuring that generated, hand written and author tests pass. * make commits of logical units * check for unnecessary whitespace with "git diff --check" before committing * do not check in commented out code or unneeded files * the first line of the commit message should be a short description and should skip the full stop * the body should provide a meaningful commit message, which: * uses the imperative, present tense: "change", not "changed" or "changes". * includes motivation for the change, and contrasts its implementation with previous behaviour * if you want your work included in the main repository, add a "Signed-off-by: Your Name " line to the commit message (or just use the option "-s" when committing) to confirm that you agree to the Developer's Certificate of Origin Patch: * if you change, add, or remove any features or make some other user interface change, the associated documentation should be updated as well. * if your name is not writable in ASCII, make sure that you send the patch in the correct encoding. Long version: I started reading over the SubmittingPatches document for git, primarily because I wanted to have a document similar to it for my projects to make sure people understand what they are doing when they write "Signed-off-by" line. But the patch submission requirements are a lot more relaxed here on the technical/contents front, because my projects are thousand times smaller ;-). So here is only the relevant bits. (0) Decide what to base your work on. In general, always base your work on the oldest branch that your change is relevant to. * A bugfix should be based on 'maint' in general. If the bug is not present in 'maint', base it on 'master'. For a bug that's not yet in 'master', find the topic that introduces the regression, and base your work on the tip of the topic. If a 'maint' branch is not present base it on master. * A new feature should be based on 'master' in general. If the new feature depends on a topic that is in 'pu', but not in 'master', base your work on the tip of that topic. * Corrections and enhancements to a topic not yet in 'master' should be based on the tip of that topic. If the topic has not been merged to 'next', it's alright to add a note to squash minor corrections into the series. * In the exceptional case that a new feature depends on several topics not in 'master', start working on 'next' or 'pu' privately and send out patches for discussion. Before the final merge, you may have to wait until some of the dependent topics graduate to 'master', and rebase your work. To find the tip of a topic branch, run "git log --first-parent master..pu" and look for the merge commit. The second parent of this commit is the tip of the topic branch. (1) Make separate commits for logically separate changes. Unless your patch is really trivial, you should not be sending out a patch that was generated between your working tree and your commit head. Instead, always make a commit with complete commit message and generate a series of patches from your repository. It is a good discipline. Describe the technical detail of the change(s). If your description starts to get too long, that's a sign that you probably need to split up your commit to finer grained pieces. That being said, patches which plainly describe the things that help reviewers check the patch, and future maintainers understand the code, are the most beautiful patches. Descriptions that summarise the point in the subject well, and describe the motivation for the change, the approach taken by the change, and if relevant how this differs substantially from the prior version, can be found on Usenet archives back into the late 80's. Consider it like good Netiquette, but for code. Oh, another thing. I am picky about whitespaces. Make sure your changes do not trigger errors with the sample pre-commit hook shipped in templates/hooks--pre-commit. To help ensure this does not happen, run git diff --check on your changes before you commit. (2) Generate your patch using git tools out of your commits. git based diff tools (git, Cogito, and StGIT included) generate unidiff which is the preferred format. You do not have to be afraid to use -M option to "git diff" or "git format-patch", if your patch involves file renames. The receiving end can handle them just fine. Please make sure your patch does not include any extra files which do not belong in a patch submission. Make sure to review your patch after generating it, to ensure accuracy. Before sending out, please make sure it cleanly applies to the "master" branch head. If you are preparing a work based on "next" branch, that is fine, but please mark it as such. (4) Sign your work To improve tracking of who did what, we've borrowed the "sign-off" procedure from the Linux kernel project on patches that are being emailed around. Although this project is a lot smaller it is a good discipline to follow it. The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as a open-source patch. The rules are pretty simple: if you can certify the below: Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. then you just add a line saying Signed-off-by: Random J Developer This line can be automatically added by git if you run the git-commit command with the -s option. Notice that you can place your own Signed-off-by: line when forwarding somebody else's patch with the above rules for D-C-O. Indeed you are encouraged to do so. Also notice that a real name is used in the Signed-off-by: line. Please don't hide your real name. Some people also put extra tags at the end. "Acked-by:" says that the patch was reviewed by the person who is more familiar with the issues and the area the patch attempts to modify. "Tested-by:" says the patch was tested by the person and found to have the desired effect. An ideal patch flow Here is an ideal patch flow for this project the current maintainer suggests to the contributors: 0. You come up with an itch. You code it up. 1. Send it to the bug tracker and cc people who may need to know about the change. The people who may need to know are the ones whose code you are butchering. These people happen to be the ones who are most likely to be knowledgeable enough to help you, but they have no obligation to help you (i.e. you ask for help, don't demand). "git log -p -- $area_you_are_modifying" would help you find out who they are. 2. You get comments and suggestions for improvements. You may even get them in a "on top of your change" patch form. 3. Polish, refine, and re-send to the the people who spend their time to improve your patch. Go back to step (2). 4. A topic branch is created with the patch and is merged to 'next', and cooked further and eventually graduates to 'master'. In any time between the (2)-(3) cycle, the maintainer may pick it up from the list and queue it to 'pu', in order to make it easier for people play with it without having to pick up and apply the patch to their trees themselves. Know the status of your patch after submission * You can use Git itself to find out when your patch is merged in master. 'git pull --rebase' will automatically skip already-applied patches, and will let you know. This works only if you rebase on top of the branch in which your patch has been merged (i.e. it will not tell you if your patch is merged in pu if you rebase on top of master). Pod-Spell-1.27/Changes000644 000766 000024 00000010776 14705245775 015052 0ustar00gknopstaff000000 000000 Revision history Pod-Spell 1.27 2024-10-20 - fix encoding of output as UTF-8 - fix link in Pod 1.26 2023-03-13 - encode output as UTF-8 1.25 2022-10-04 - releasing as stable 1.24 2022-10-03 (TRIAL RELEASE) - account for stopwords added in UTF-8 encoded form 1.23 2022-09-21 - releasing as stable 1.22 2022-08-29 (TRIAL RELEASE) - fix finding wordlist when not run against files directly in lib/ 1.21 2022-08-24 (TRIAL RELEASE) - port to use Pod::Simple rather than Pod::Parser - use File::Spec rather than Path::Tiny - allow explicit debug option to override environment variable - packaging and metadata updates 1.20 2016-04-22 - Stable release, made in Rugby, UK during Perl QA Hackathon 2016 1.19_91 2016-04-21 - Drop use of File::ShareDir::ProjectDistDir (GitHub #26). Thanks Kent Fredric! - Allow stop words with '.' (GitHub #28). Thanks Paulo Custodio! 1.19_90 2016-02-20 - Hide internals: the POD parser is moved to a private package and the Pod::Spell package now only exposes the public interface. This is a first step towards rewriting the parser using Pod::Simple (planned for Pod-Spell-2.0). - 'parse_from_file' and 'parse_from_filehandle' are now explicitely documented (by copying doc from Pod::Parser). 1.19 2016-02-20 - Don't set $Text::Wrap::huge globally, but localize it - Load Pod::Wordlist only if used 1.18 2016-01-30 - New maintainer: Olivier Mengué (DOLMEN) Repo is now hosted at github.com/perl-pod/Pod-Spell - Fix warning in strip_stopwords (GH #23) - re-apply "podspell script: set output encoding from locale CTYPE" (GH #22, #17). The issue in 1.16 was an incorrect dependency on I18N::Langinfo. 1.17 2015-03-08 - revert changes in 1.16 they are not compatible with windows GH #18 1.16 2015-02-24 - podspell script: set output encoding from locale CTYPE (DOLMEN) 1.15 2014-02-28 - Convert to strict mode of File::ShareDir::ProjectDistDir (KENTNL) - change to use Path::Tiny->lines_utf8 1.14 2014-02-12 - Discontinue use of File::Slurp, use Path::Tiny->lines instead GH #15 ( Ether ) 1.13 2013-11-02 - fix encoding issues issues in pod for perldoc 1.12 2013-10-17 - improve documentation 1.11 2013-10-17 - fix shebang to /usr/bin/perl for EUMM replacment GH #13 (dolmen) 1.10 2013-09-27 [FEATURES] - added 'no_wide_chars' option to strip words with such characters from the output. This may help spellcheckers that can't cope with UTF-8 [CHANGED] - improved punctuation stripping algorithm for better word isolation (example C<< "hello". >> now is found as "hello") - strips all word that do not have at least one \w character as a spellchecker isn't likely to do anything useful with them [DOCUMENTED] - added recommendations for dealing with character encoding 1.09 2013-09-25 [FIXED] - stopwords with 's are learned without 's to match how they are checked [CHANGED] - leading and trailing punctuation is entirely stripped since the spellchecker won't care anyway. Trailing periods are *not* stripped as they might be abbreviations ("Ph.D."), but such words are checked against the stoplist both with and without trailing periods to account for abbreviations and words at the end of a sentence. 1.08 2013-09-24 [FIXED] - hyphenated word parts are also checked against the stoplist and stripped (dagolden) GH #9 [DOCUMENTED] - noted that stopwords must be added before words appear in Pod 1.07 2013-09-14 - add many words [FEATURES] - Pod::Wordlist is an Object ( dagolden ) - Lingua::EN::Inflect is used to reduce requiring plurals in the list ( dagolden ) - the wordlist is now a sharedir file [DEPRECATED] - accessing %Pod::Wordlist::Wordlist directly 1.06 2013-09-08 - import stopwords from Pod::Wordlist::hanekomu except names 1.05 2013-07-07 - add stopwords 1.04 2013-05-08 - fix tests to work on older perls 1.03 2013-05-08 - update copyright info - require 5.8 (let me know if this is a problem for you) - improve tests - hopefully fix failing test on windows - improve code readability - remove DEBUG for private _is_debug method 1.02 2013-05-07 - convert to dzil and adopt 1.01 2001-10-27 - first release version ( SBURKE ) Pod-Spell-1.27/prereqs.yml000644 000766 000024 00000000446 14705245775 015754 0ustar00gknopstaff000000 000000 runtime: requires: Carp: 0 Class::Tiny: 0 File::ShareDir: 0 Lingua::EN::Inflect: 0 POSIX: 0 Pod::Escapes: 0 Pod::Simple: 3.27 Text::Wrap: 0 constant: 0 locale: 0 parent: 0 perl: 5.008001 test: requires: File::Temp: 0 Test::More: 0.88 Pod-Spell-1.27/MANIFEST000644 000766 000024 00000001324 14705245775 014675 0ustar00gknopstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.032. .perlcriticrc CONTRIBUTING Changes LICENSE MANIFEST META.json META.yml Makefile.PL README bin/podspell dist.ini lib/Pod/Spell.pm lib/Pod/Wordlist.pm prereqs.yml share/wordlist t/00-compile.t t/00-report-prereqs.dd t/00-report-prereqs.t t/basic.t t/debug.t t/fix_21.t t/get-stopwords.t t/text-block.t t/utf8.t weaver.ini xt/author/cpan-changes.t xt/author/critic.t xt/author/distmeta.t xt/author/eol.t xt/author/kwalitee.t xt/author/minimum-version.t xt/author/mojibake.t xt/author/no-tabs.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/portability.t xt/author/test-version.t xt/release/changes_has_content.t Pod-Spell-1.27/t/000755 000766 000024 00000000000 14705245775 014007 5ustar00gknopstaff000000 000000 Pod-Spell-1.27/xt/000755 000766 000024 00000000000 14705245775 014177 5ustar00gknopstaff000000 000000 Pod-Spell-1.27/README000644 000766 000024 00000017724 14705245775 014437 0ustar00gknopstaff000000 000000 NAME Pod::Spell - a formatter for spellchecking Pod VERSION version 1.27 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 is 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 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 Pod::Spell->new(%options) Creates a new Pod::Spell instance. Accepts several options: debug When set to a true value, will output debugging messages about how the Pod is being processed. Defaults to false. stopwords Can be specified to use an alternate wordlist instance. Defaults to a new Pod::Wordlist instance. no_wide_chars Will be passed to Pod::Wordlist when creating a new instance. Causes all words with characters outside the Latin-1 range to be stripped from the output. stopwords $self->stopwords->isa('Pod::WordList'); # true parse_from_filehandle($in_fh,$out_fh) This method takes an input filehandle (which is assumed to already be opened for reading) and reads the entire input stream looking for blocks (paragraphs) of POD documentation to be processed. If no first argument is given the default input filehandle "STDIN" is used. The $in_fh parameter may be any object that provides a getline() method to retrieve a single line of input text (hence, an appropriate wrapper object could be used to parse PODs from a single string or an array of strings). parse_from_file($filename,$outfile) This method takes a filename and does the following: * opens the input and output files for reading (creating the appropriate filehandles) * invokes the parse_from_filehandle() method passing it the corresponding input and output filehandles. * closes the input and output files. If the special input filename "", "-" or "<&STDIN" is given then the STDIN filehandle is used for input (and no open or close is performed). If no input filename is specified then "-" is implied. Filehandle references, or objects that support the regular IO operations (like "<$fh>" or "$fh-) are also accepted; the handles must already be opened. If a second argument is given then it should be the name of the desired output file. If the special output filename "-" or ">&STDOUT" is given then the STDOUT filehandle is used for output (and no open or close is performed). If the special output filename ">&STDERR" is given then the STDERR filehandle is used for output (and no open or close is performed). If no output filehandle is currently in use and no output filename is specified, then "-" is implied. Alternatively, filehandle references or objects that support the regular IO operations (like "print", e.g. IO::String) are also accepted; the object must already be opened. ENCODINGS If your Pod is encoded in something other than Latin-1, it should declare an encoding using the ""=encoding *encodingname*"" in perlpod directive. 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.) Plural forms are added automatically using Lingua::EN::Inflect. 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 ...meaning that you're adding a stopword of "virtù". If you left the ":" out, that would mean you were adding a stopword of "virtE" (with a literal E, a literal <, etc), which will have no effect, since any occurrences of virtE don't look like a normal human-language word anyway, and so would be screened out before the stopword list is consulted anyway. CAVEATS finding stopwords defined with "=for" Pod::Spell makes a single pass over the POD. Stopwords must be added before they show up in the POD. 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. SEE ALSO * Pod::Wordlist * Pod::Simple * podchecker also known as Pod::Checker * perlpod, perlpodspec BUGS Please report any bugs or feature requests on the bugtracker website or by email to bug-Pod-Spell@rt.cpan.org . 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 * Caleb Cushing CONTRIBUTORS * David Golden * Graham Knop * Kent Fredric * Mohammad S Anwar * Olivier Mengué * Paulo Custodio COPYRIGHT AND LICENSE This software is Copyright (c) 2024 by Olivier Mengué. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) Pod-Spell-1.27/META.yml000644 000766 000024 00000003031 14705245775 015012 0ustar00gknopstaff000000 000000 --- abstract: 'a formatter for spellchecking Pod' author: - 'Sean M. Burke ' - 'Caleb Cushing ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' File::Temp: '0' IO::Handle: '0' IPC::Open3: '0' Test::More: '0.88' configure_requires: ExtUtils::MakeMaker: '0' File::ShareDir::Install: '0.06' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Pod-Spell provides: Pod::Spell: file: lib/Pod/Spell.pm version: '1.27' Pod::Wordlist: file: lib/Pod/Wordlist.pm version: '1.27' requires: Carp: '0' Class::Tiny: '0' File::ShareDir: '0' Lingua::EN::Inflect: '0' POSIX: '0' Pod::Escapes: '0' Pod::Simple: '3.27' Text::Wrap: '0' constant: '0' locale: '0' parent: '0' perl: '5.008001' resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Pod-Spell homepage: https://github.com/perl-pod/Pod-Spell repository: https://github.com/perl-pod/Pod-Spell.git version: '1.27' x_contributors: - 'David Golden ' - 'Graham Knop ' - 'Kent Fredric ' - 'Mohammad S Anwar ' - 'Olivier Mengué ' - 'Paulo Custodio ' x_generated_by_perl: v5.38.2 x_serialization_backend: 'YAML::Tiny version 1.74' x_spdx_expression: Artistic-2.0 x_use_unsafe_inc: 0 Pod-Spell-1.27/lib/000755 000766 000024 00000000000 14705245775 014312 5ustar00gknopstaff000000 000000 Pod-Spell-1.27/Makefile.PL000644 000766 000024 00000004030 14705245775 015513 0ustar00gknopstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.032. use strict; use warnings; use 5.008001; use ExtUtils::MakeMaker; use File::ShareDir::Install; $File::ShareDir::Install::INCLUDE_DOTFILES = 1; $File::ShareDir::Install::INCLUDE_DOTDIRS = 1; install_share dist => "share"; my %WriteMakefileArgs = ( "ABSTRACT" => "a formatter for spellchecking Pod", "AUTHOR" => "Sean M. Burke , Caleb Cushing ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::ShareDir::Install" => "0.06" }, "DISTNAME" => "Pod-Spell", "EXE_FILES" => [ "bin/podspell" ], "LICENSE" => "artistic_2", "MIN_PERL_VERSION" => "5.008001", "NAME" => "Pod::Spell", "PREREQ_PM" => { "Carp" => 0, "Class::Tiny" => 0, "File::ShareDir" => 0, "Lingua::EN::Inflect" => 0, "POSIX" => 0, "Pod::Escapes" => 0, "Pod::Simple" => "3.27", "Text::Wrap" => 0, "constant" => 0, "locale" => 0, "parent" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Temp" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Test::More" => "0.88" }, "VERSION" => "1.27", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Class::Tiny" => 0, "ExtUtils::MakeMaker" => 0, "File::ShareDir" => 0, "File::Spec" => 0, "File::Temp" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Lingua::EN::Inflect" => 0, "POSIX" => 0, "Pod::Escapes" => 0, "Pod::Simple" => "3.27", "Test::More" => "0.88", "Text::Wrap" => 0, "constant" => 0, "locale" => 0, "parent" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); { package MY; use File::ShareDir::Install qw(postamble); } Pod-Spell-1.27/weaver.ini000644 000766 000024 00000000204 14705245775 015532 0ustar00gknopstaff000000 000000 [@CorePrep] [-SingleEncoding] [-StopWords] [Generic / NAME] [ReplaceVersion] [Leftovers] [Bugs] [Authors] [Contributors] [Legal] Pod-Spell-1.27/.perlcriticrc000644 000766 000024 00000006756 14705245775 016250 0ustar00gknopstaff000000 000000 severity = 1 verbose = 9 only = 1 [BuiltinFunctions::ProhibitComplexMappings] [BuiltinFunctions::ProhibitLvalueSubstr] [BuiltinFunctions::ProhibitShiftRef] [BuiltinFunctions::ProhibitSleepViaSelect] [BuiltinFunctions::ProhibitStringyEval] [BuiltinFunctions::ProhibitUniversalCan] [BuiltinFunctions::ProhibitUniversalIsa] [BuiltinFunctions::ProhibitVoidGrep] [BuiltinFunctions::ProhibitVoidMap] [BuiltinFunctions::RequireGlobFunction] [BuiltinFunctions::RequireSimpleSortBlock] [ClassHierarchies::ProhibitAutoloading] [ClassHierarchies::ProhibitExplicitISA] [ClassHierarchies::ProhibitOneArgBless] [CodeLayout::ProhibitHardTabs] [CodeLayout::RequireConsistentNewlines] [ControlStructures::ProhibitDeepNests] [ControlStructures::ProhibitLabelsWithSpecialBlockNames] [ControlStructures::ProhibitMutatingListFunctions] [ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions] [ControlStructures::ProhibitUnreachableCode] [ControlStructures::ProhibitYadaOperator] [ErrorHandling::RequireCarping] [ErrorHandling::RequireCheckingReturnValueOfEval] [InputOutput::ProhibitBacktickOperators] [InputOutput::ProhibitBarewordFileHandles] [InputOutput::ProhibitExplicitStdin] [InputOutput::ProhibitJoinedReadline] [InputOutput::ProhibitOneArgSelect] [InputOutput::ProhibitReadlineInForLoop] [InputOutput::ProhibitTwoArgOpen] [InputOutput::RequireBriefOpen] [InputOutput::RequireCheckedOpen] [InputOutput::RequireEncodingWithUTF8Layer] [Miscellanea::ProhibitFormats] [Miscellanea::ProhibitUnrestrictedNoCritic] [Modules::ProhibitAutomaticExportation] [Modules::ProhibitConditionalUseStatements] [Modules::ProhibitEvilModules] [Modules::ProhibitExcessMainComplexity] [Modules::RequireBarewordIncludes] [Modules::RequireEndWithOne] [Modules::RequireExplicitPackage] [Modules::RequireFilenameMatchesPackage] [NamingConventions::ProhibitAmbiguousNames] [Objects::ProhibitIndirectSyntax] [RegularExpressions::ProhibitCaptureWithoutTest] [RegularExpressions::ProhibitComplexRegexes] [RegularExpressions::ProhibitUnusedCapture] [Subroutines::ProhibitBuiltinHomonyms] [Subroutines::ProhibitExcessComplexity] max_mccabe = 30 [Subroutines::ProhibitManyArgs] [Subroutines::ProhibitNestedSubs] [Subroutines::ProhibitReturnSort] [Subroutines::ProhibitSubroutinePrototypes] [Subroutines::ProhibitUnusedPrivateSubroutines] allow_name_regex = _handle_\w+ [Subroutines::ProtectPrivateSubs] [TestingAndDebugging::ProhibitNoStrict] [TestingAndDebugging::ProhibitNoWarnings] [TestingAndDebugging::ProhibitProlongedStrictureOverride] [TestingAndDebugging::RequireTestLabels] [TestingAndDebugging::RequireUseStrict] [TestingAndDebugging::RequireUseWarnings] [ValuesAndExpressions::ProhibitCommaSeparatedStatements] [ValuesAndExpressions::ProhibitComplexVersion] [ValuesAndExpressions::ProhibitImplicitNewlines] [ValuesAndExpressions::ProhibitLeadingZeros] [ValuesAndExpressions::ProhibitMismatchedOperators] [ValuesAndExpressions::ProhibitMixedBooleanOperators] [ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters] [ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator] [ValuesAndExpressions::ProhibitVersionStrings] [ValuesAndExpressions::RequireQuotedHeredocTerminator] [Variables::ProhibitAugmentedAssignmentInDeclaration] [Variables::ProhibitConditionalDeclarations] [Variables::ProhibitMatchVars] [Variables::ProhibitPackageVars] [Variables::ProhibitReusedNames] [Variables::ProhibitUnusedVariables] [Variables::ProtectPrivateVars] [Variables::RequireLexicalLoopIterators] [Variables::RequireLocalizedPunctuationVars] [Variables::RequireNegativeIndices] Pod-Spell-1.27/META.json000644 000766 000024 00000006314 14705245775 015171 0ustar00gknopstaff000000 000000 { "abstract" : "a formatter for spellchecking Pod", "author" : [ "Sean M. Burke ", "Caleb Cushing " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Pod-Spell", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "File::ShareDir::Install" : "0.06" }, "suggests" : { "JSON::PP" : "2.27300" } }, "develop" : { "requires" : { "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::EOL" : "0", "Test::Kwalitee" : "1.21", "Test::MinimumVersion" : "0", "Test::Mojibake" : "0", "Test::More" : "0.88", "Test::NoTabs" : "0", "Test::Perl::Critic" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage::TrustMe" : "0", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", "Test::Version" : "1" } }, "runtime" : { "requires" : { "Carp" : "0", "Class::Tiny" : "0", "File::ShareDir" : "0", "Lingua::EN::Inflect" : "0", "POSIX" : "0", "Pod::Escapes" : "0", "Pod::Simple" : "3.27", "Text::Wrap" : "0", "constant" : "0", "locale" : "0", "parent" : "0", "perl" : "5.008001" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "File::Temp" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Test::More" : "0.88" } } }, "provides" : { "Pod::Spell" : { "file" : "lib/Pod/Spell.pm", "version" : "1.27" }, "Pod::Wordlist" : { "file" : "lib/Pod/Wordlist.pm", "version" : "1.27" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-Pod-Spell@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Pod-Spell" }, "homepage" : "https://github.com/perl-pod/Pod-Spell", "repository" : { "type" : "git", "url" : "https://github.com/perl-pod/Pod-Spell.git", "web" : "https://github.com/perl-pod/Pod-Spell" } }, "version" : "1.27", "x_contributors" : [ "David Golden ", "Graham Knop ", "Kent Fredric ", "Mohammad S Anwar ", "Olivier Mengu\u00e9 ", "Paulo Custodio " ], "x_generated_by_perl" : "v5.38.2", "x_serialization_backend" : "Cpanel::JSON::XS version 4.37", "x_spdx_expression" : "Artistic-2.0", "x_use_unsafe_inc" : 0 } Pod-Spell-1.27/share/000755 000766 000024 00000000000 14705245775 014646 5ustar00gknopstaff000000 000000 Pod-Spell-1.27/dist.ini000644 000766 000024 00000004347 14705245775 015220 0ustar00gknopstaff000000 000000 name = Pod-Spell author = Sean M. Burke author = Caleb Cushing license = Artistic_2_0 copyright_holder = Olivier Mengué copyright_year = 2024 ;;; Gather [Git::GatherDir] exclude_filename = Makefile.PL exclude_filename = META.json exclude_filename = LICENSE exclude_filename = README.md [GatherFile] filename = .perlcriticrc ;;; Metadata [Git::Contributors] [MetaProvides::Package] [MetaResources] bugtracker.web = https://rt.cpan.org/Public/Dist/Display.html?Name=Pod-Spell bugtracker.mailto = bug-Pod-Spell@rt.cpan.org homepage = https://github.com/perl-pod/Pod-Spell repository.url = https://github.com/perl-pod/Pod-Spell.git repository.web = https://github.com/perl-pod/Pod-Spell repository.type = git [PrereqsFile] [UseUnsafeInc] dot_in_INC = 0 ;;; Modification [PodWeaver] ; authordep Pod::Weaver::Section::Contributors ; authordep Pod::Weaver::Section::ReplaceVersion ; authordep Pod::Weaver::Plugin::StopWords ;;; Extra Files [License] [MetaJSON] [MetaYAML] [Manifest] [Pod2Readme] ;;; Installer [ShareDir] [ExecDir] [MakeMaker] ;;; Tests [MetaTests] [MojibakeTests] [PodSyntaxTests] [Test::CPAN::Changes] :version = 0.013 filename = xt/author/cpan-changes.t [Test::ChangesHasContent] [Test::Compile] [Test::EOL] [Test::Kwalitee] filename = xt/author/kwalitee.t [Test::MinimumVersion] [Test::NoTabs] [Test::Perl::Critic] :version = 3.003 profile = .perlcriticrc verbose = 8 [Test::Pod::Coverage::TrustMe] [Test::PodSpelling] [Test::Portability] options = test_one_dot = 0 [Test::ReportPrereqs] [Test::Version] ;;; Repo files [CopyFilesFromRelease] filename = Makefile.PL filename = META.json filename = LICENSE [ReadmeAnyFromPod / ReadmeGFMInRoot] phase = release [Regenerate::AfterReleasers] plugin = CopyFilesFromRelease plugin = ReadmeGFMInRoot ;;; Release [TestRelease] [RunExtraTests] [ConfirmRelease] [UploadToCPAN] [Git::Check] [Git::Remote::Check] branch = master [@Git::VersionManager] -remove = Prereqs commit_files_after_release = Makefile.PL commit_files_after_release = META.json commit_files_after_release = LICENSE commit_files_after_release = README.md NextRelease.format = %-6v %{yyyy-MM-dd}d%{ (TRIAL RELEASE)}T [Git::Push] Pod-Spell-1.27/share/wordlist000644 000766 000024 00000024122 14705245775 016441 0ustar00gknopstaff000000 000000 Aas absolutize absolutized absolutizing accessor ACLs acos ActivePerl ActiveState adaptee addset administrativa AES afterwards aggregator Albery aliased aliasing alloc alphabetic alphanumeric AMD Amiga AmigaOS Aminet analysis AnyEvent AoH AOP API APIs arcana arg arrayref asctime asin AspectJ associativity atan atexit atime atof atoi atol authenticator autocroak autoflush autoflushing autogenerate autogenerated autoincrement autoload autoloadable autoloaded AutoLoader autoloading automagically autoprocess autoquoting autosplit autouse autovivification autovivified autovivify autovivifying awk Babelfish backend backgrounded backgrounding backlink backquote backquoting backreference backreferencing backslashed backslashing backtick backtrace backwhack backwhacking bareword basename bcrypt behaviour benchmarked benchmarking bidirectional binmode bistable bitfield bitstring bitwise blead bleadperl blib blockdenting blog bool boolean breakpoint BSCINABTE bsearch bugfix bugfixing bugtracker buildable builtin Bunce byacc bytecode byteorder byteperl bytestream CAcert callback callee calloc CamelCase canonicalize canonpath capturable CAs catdir catfile ccflags cd centric cetera CGIs changelog charset chdir checksumming chmod chomp chown chr chroot chrooted chunked ciphertext CISC classname clearerr CLI clickable closebrace closedir cmp codepage codepoint coderef coercion commifies compilable composable computerese config configurability configurator coprocess copyable coredump Coreutils Coro coroutine cos cosh cpan CPANPLUS CPAN.pm cpantester cperl cpp creat crlf cron crosscutting cruft cryptographically csh css ctermid ctime curdir curly cuserid cwd cyclicity cygwin daemonization datagram dataset datastream datatype datestamp datetime DBI dbmclose dbmopen deallocate deallocated deallocation Debian debugger decompiler decrypting delset delurk denormalized deparse dequeue deref dereference dereferenced dereferencer dereferencing dereffing deregistered deserialization deserialize deserialized deserializing destructor die'ing diff difftime dirhandle distname Django djgpp dmake DNS Dominus don'ts dosish dotfile downcase drivename DSL DTDs DWIM DWIMs DynaLoader dzil egrep egroup EINTR elsif emacs emptyset encipherment encoding endeavour endgrent endhostent endian endnetent endprotoent endpwent endservent enqueue enqueued enum eof EPP eq errno et euid eval evalled execl execle execlp executable execv execve execvp EXEs fabs FAQs fatalize fatalized fatpacking fclose fcntl fdopen feof ferror fflush fgetc fgetpos fgets Fibonacci fifo fileglob filehandle filemode filename fileno filesize filespec filesystem filetest fillset Firefox FirePHP FIXME fixpath flatfile fmod fmt followup fopen foreach foregrounded formatter formfeed formline fpathconf fprintf fputc fputs fread FreeBSD FreezeThaw freopen Freshmeat Friedl frontend fscanf fseek fsetpos fstat ftell ftok fu func fwrite gcc gcos getall getattr getc getcc getcflag getchar getcwd getegid getenv geteuid getgid getgrent getgrgid getgrnam getgroups gethostbyaddr gethostbyname gethostent getiflag getispeed getlflag getlogin getncnt getnetbyaddr getnetbyname getnetent getoflag Getopts getospeed getpeername getpgrp getpid getppid getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname gettimeofday getuid getval getzcnt gid GIFs Gisle github glibc global globbed globbing globref gmtime GNU Google goto gotos grandfathered GraphViz grep grepped grepping groff gt guid gunzip gvim gz gzip gzipped hacky hardcoded hardcoding hashref Hietaniemi HMAC HMACs homepage honoured hostname hostonly htgroup htmldir htmlroot htpasswd HTTP httpd httponly https Hurd iconv idempotency identifier IDs IETF Ilya implementor indices inf inferencing infile ini init initializer inline inlined inlining inode inplace installable int interconversion interconverted interoperability interprocess invocant ioctl IP IPs IPv IPv4 IPv6 IRC isa isalnum isalpha isatty iscntrl isdigit isgraph ish islower ismember ISP isprint ISPs ispunct isspace isupper isxdigit iteratively iterator iTerm japanese japh Jarkko javascript Joseki jpg json Kerberos ksh kwalitee lastkey LaTeX lc lcfirst ldexp ldiv Lenzo lex lexer lexical lexically lexing lexperl libdes libnet libwww linearized linux localeconv localhost localtime locator lockf logfile logical login longjmp lookahead lookbehind lookup lossy lseek lstat lt Lukka lvalue lwp MachTen MacOS MacPerl MACs mailx makefile MakeMaker malloc manpage Markdown marshalling matlab maxima mblen mbstowcs mbtowc memcached memchr memcmp memcpy memmove memoization memoize memoized memoizing memset Mersenne metacharacter metaclasses metaconfig metadata metainformation metaquoting Mexico microtuning middleware miniperl miscompiled misconfiguration misconfigured mixin mkdir mkdn mkdtemp mkfifo mkstemp mktemp mktime modf modulino MongoDB monkeypatch monkeypatching monospaced mortalize mortalized mountpoint Mozilla msgctl msgget MSWin mtime multi multibyte multicast multicharacter multihomed multiline multiprocess multithreadable multi-value multivalued multi-valued multiwindow munge munger munging munition mutator mutex mv MVC MYMETA mysql namespace NaN Nandor NaNs Napster nawk ncftp nd ndbm ne nestable New newline NFS nmake nonabortive nonblocking nonthreaded noop nosuid nroff numeric numify nvi nybble obsoleted occurence of offsetof ok OO OOP op opcode openbrace OpenBSD opendir OpenSSH opnumber Opscode Orcish ord orientedness Orwant OSX outdent outfile overloadable overpackage overwriteable PadWalker parameterizable parameterized parametric PARC paren parser passphrase passwd patchlevel pathconf pathname peeraddr peerhost peerport perl perlaix perlamiga perlbook perlboot perlbootc perlbot perlbug perlcc perlclib perlcompile perlcritic perlcygwin perldata perldbmfilter perldebguts perldebtut perldelta perldiag perldoc perldos perldsc perlebcdic perlepoc perlfaq perlfilter perlfork perlform perlhack perlhist perlhpux perlintern perlio perliotut perlipc Perlis Perlish perllexwarn perllol perlmachten perlmacos perlmain perlmodinstall Perlmonks perlmpeix perlnewmod perlnumber perlobj perlopentut perlpod perlport perlref perlreftut perlrequick perlretut perlrun perlsh perlsolaris perlstyle perlsyn perlthrtut perltoc perltodo perltootc perltrap perlunicode perlutil perlvos perlxs perlxstut perror pessimal pessimize petabyte Ph.D. phash PHP pid pkunzip placeholder Plack pluggable plugin PluginBundle podchecker podified podlator PodParser podpath podroot podselect pointcut polymorphic polymorphing POSIX postamble postorder pow pragma pragmata pre preallocate preallocated preallocation prebuilt precompiled precompute precomputed predeclaration predeclare predeclared prepend prepended prepending preprocessed prereq printf PRNG PRNGs processable procfs programmatically prototyped proxied Prymmer pseudoclass PSGI Psion ptr pumpking putc putchar qr qsort quartile Quicksort quotemeta qx rand RDBM RDBMs RDBMS rdo readdir readline readlink README README.posix?bc readpipe real realloc realtime recomputation recompute recomputing recurse recv redeclaration Redhat redirection redispatch redistributable ref regex regexp reimplement rekeying RemotePort renderable renice reparse repo representable resample resampling resending resolver reswap rethrow rethrown reusability reval rewinddir RFCs rindex RISC rmdir roadmap roff rootdir rsh rsync runnable runtime rvalue rxvt san sbrace%s scalability scanf Schwartzian scoping scp searchable sed seekable seekdir segfault SelfLoading semctl semget semop sendmail Sereal serializer setall setattr setcc setcflag setenv setgid setgrent sethostent setiflag setispeed setjmp setlflag setlocale setlogsock setnetent setoflag setospeed setpgid setpriority setprotoent setpwent setregid setreuid setservent setsid setuid setval sfio sh SHA shipit shmctl shmget shmread shmwrite sigaction sighandler sigil siglongjmp sigpending sigprocmask sigsetjmp sigsuspend sigtrap SimpleDB sinh sizeof SMTP snd sockaddr sockdomain sockhost sockport socktype soundex SourceForge spam specifier spellcheck spellchecking Spiffy sprintf SQL sqlite sqrt srand sscanf SSL startup statefulness statfs static stderr stdin stdio stdios stdout stopword storable storage strcat strchr strcmp strcoll strcpy strcspn strerror strftime stringification stringified stringify stringifying stringwise strlen strncat strncmp strncpy strpbrk strrchr strspn strstr strtod strtok strtol strtoul struct strxfrm stty subclass subclassed subclassing subdir subdirectory subexpression submatch subnode subobject subpattern subprocess subscriptable substr substring subtree subtype subtyped sudo suidperl superclass superuser svk SVs Sx symlink symlinked sysadmin syscall sysconf syslog sysopen sysread sysseek syswrite taintedness tanh tarball tcdrain tcflow tcflush tcgetattr tcgetpgrp tcl tcsendbreak tcsetpgrp tcsh teardown telldir tempdir tempfile templating tempnam Tenon termcap termios TeX textarea threadedness throwable timegm timelocal timestamp timezone TIMTOWTDI TIMTOWTDIBSCINABTE titlecase Tk tmpfile tmpnam tokenize tokenizer tolower toolchain Torkington toupper tr transcoding tridirectional trn tty ttyname Tuomas tuple Turoff twip txt typechecking typedefs typeglob typemap tzname tzset uc ucfirst uid ulimit umask uname unbackslashed unblessed unbuffer unbuffered unbuffering unbundled uncastable unconfigured uncuddled undef undefine undefining undenting undiagnosed undump unencrypted unescape unescaped unescaping unexpand ungetc unhandled Unicode unimport unindented uninitialized uniqued University unix Unixish unlink unlinked unlinking unmaintainable unmaintained unmangled unmemoized unmorph unmounting unordered unparsable unportable unprototyped unreferenced unshift unshifted unsignedness unsubscripted untaint untainting untrap untrappable untrapped untrusted unzipper upcase updir upgradability urandom uri URI.pm url userinfo username utc utf utime uuid val varglob variadic vec versa vfprintf vgrind vim vprintf Vromans vsprintf W3CDTF waitpid wallclock wantarray warnock wcstombs wctomb webserver wellformedness whitelist whitespace wiki wildcard WindowsNT wordlist wordpad wordprocessor workflow wormhole wrapsuid writable writeable XKCD xor XS XSUB XSUBs yacc YAML YAPC yml yylex zsh Pod-Spell-1.27/lib/Pod/000755 000766 000024 00000000000 14705245775 015034 5ustar00gknopstaff000000 000000 Pod-Spell-1.27/lib/Pod/Spell.pm000644 000766 000024 00000027654 14705245775 016467 0ustar00gknopstaff000000 000000 package Pod::Spell; use 5.008; use strict; use warnings; our $VERSION = '1.27'; sub new { my ( $class, %args ) = @_; my $no_wide_chars = delete $args{no_wide_chars}; my $debug = exists $args{debug} ? delete $args{debug} : $ENV{PERL_POD_SPELL_DEBUG}; my $stopwords = $args{stopwords} || do { require Pod::Wordlist; Pod::Wordlist->new( _is_debug => $debug, no_wide_chars => $no_wide_chars ) }; my $parser = Pod::Spell::_Processor->new; $parser->stopwords($stopwords); $parser->_is_debug($debug); my %self = ( processor => $parser, stopwords => $stopwords, debug => $debug, ); bless \%self, $class } sub _is_debug { (shift)->{debug} ? 1 : 0; } sub stopwords { (shift)->{stopwords} } sub parse_from_file { my $self = shift; $self->{processor}->parse_from_file(@_); } sub parse_from_filehandle { my $self = shift; $self->parse_from_file(@_); } package # Hide from indexing Pod::Spell::_Processor; use parent 'Pod::Simple'; use Text::Wrap (); __PACKAGE__->_accessorize(qw( stopwords _is_debug )); sub new { my $class = shift; my $self = $class->SUPER::new(@_); $self->accept_targets('stopwords'); return $self; } my %track_elements = ( for => 1, Verbatim => 1, L => 1, C => 1, F => 1, ); sub output_fh { my $self = shift; if (@_) { my ($fh) = @_; my $encoded_fh = grep $_ eq 'utf8', PerlIO::get_layers(*$fh); $self->{_encoded_fh} = $encoded_fh; } return $self->SUPER::output_fh(@_); } sub _handle_element_start { my ($self, $element_name, $attr) = @_; $self->{buffer} = '' if !defined $self->{buffer}; if ($track_elements{$element_name}) { push @{ $self->{in_element} }, [ $element_name, $attr ]; } } sub _handle_text { my ($self, $text) = @_; my $in = $self->{in_element}; if ($in && @$in) { my ($element_name, $attr) = @{$in->[-1]}; if ($element_name eq 'for' && $attr->{target_matching} eq 'stopwords') { # this will match both for/begin and stopwords/:stopwords print "Stopword para: <$text>\n" if $self->_is_debug; $self->stopwords->learn_stopwords($text); return; } # totally ignore verbatim sections elsif ($element_name eq 'Verbatim') { return; } elsif ($element_name eq 'L') { return if $attr->{'content-implicit'}; } elsif ($element_name eq 'C' || $element_name eq 'F') { # maintain word boundaries my $pre = $text =~ s{\A\s+}{} ? ' ' : ''; my $post = $text =~ s{\s+\z}{} ? ' ' : ''; # if _ is joined with text before or after, it will be treated as # a Perl token and the entire word ignored $text = $pre . (length $text ? '_' : '') . $post; } } $self->{buffer} .= $text; } sub _handle_element_end { my ($self, $element_name) = @_; my $in = $self->{in_element}; if ($in && @$in && $in->[-1][0] eq $element_name) { pop @$in; } return if $element_name !~ m{\A(?:Para|head\d|item-.*|over-block)\z}; my $buffer = delete $self->{buffer}; if (!defined $buffer || !length $buffer) { return; } my $fh = $self->output_fh; my $out = $self->stopwords->strip_stopwords($buffer); # maintain exact output of older Pod::Parser based implementation print { $fh } "\n" if $element_name ne 'Para'; return if !length $out; local $Text::Wrap::huge = 'overflow'; my $wrapped = Text::Wrap::wrap( '', '', $out ) . "\n\n"; if ($self->{_encoded_fh}) { print { $fh } $wrapped; } else { print { $fh } Encode::encode('UTF-8', $wrapped); } } 1; __END__ =pod =encoding UTF-8 =for :stopwords Sean M. Burke Caleb Cushing Olivier Mengué PODs virtE qux =head1 NAME Pod::Spell - a formatter for spellchecking Pod =head1 VERSION version 1.27 =head1 SYNOPSIS use Pod::Spell; Pod::Spell->new->parse_from_file( 'File.pm' ); Pod::Spell->new->parse_from_filehandle( $infile, $outfile ); Also look at L % perl -MPod::Spell -e "Pod::Spell->new->parse_from_file(shift)" Thing.pm |spell |fmt ...or instead of piping to spell or C, use C<< >temp.txt >>, and open F in your word processor for spell-checking. =head1 DESCRIPTION Pod::Spell is a Pod formatter whose output is good for spellchecking. Pod::Spell is rather like L, 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 "C<$thing>" or "C" or "hashref"). This class works by filtering out words that look like Perl or any form of computerese (like "C<$thing>" or "C<< N>7 >>" or "C<@{$foo}{'bar','baz'}>", anything in CE...E or FE...E 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 L, and can be supplemented (on a per-document basis) by having C<"=for stopwords"> / C<"=for :stopwords"> region(s) in a document. =head1 METHODS =head2 new Pod::Spell->new(%options) Creates a new Pod::Spell instance. Accepts several options: =over 4 =item debug When set to a true value, will output debugging messages about how the Pod is being processed. Defaults to false. =item stopwords Can be specified to use an alternate wordlist instance. Defaults to a new Pod::Wordlist instance. =item no_wide_chars Will be passed to Pod::Wordlist when creating a new instance. Causes all words with characters outside the Latin-1 range to be stripped from the output. =back =head2 stopwords $self->stopwords->isa('Pod::WordList'); # true =head2 parse_from_filehandle($in_fh,$out_fh) This method takes an input filehandle (which is assumed to already be opened for reading) and reads the entire input stream looking for blocks (paragraphs) of POD documentation to be processed. If no first argument is given the default input filehandle C is used. The C<$in_fh> parameter may be any object that provides a B method to retrieve a single line of input text (hence, an appropriate wrapper object could be used to parse PODs from a single string or an array of strings). =head2 parse_from_file($filename,$outfile) This method takes a filename and does the following: =over 2 =item * opens the input and output files for reading (creating the appropriate filehandles) =item * invokes the B method passing it the corresponding input and output filehandles. =item * closes the input and output files. =back If the special input filename "", "-" or "<&STDIN" is given then the STDIN filehandle is used for input (and no open or close is performed). If no input filename is specified then "-" is implied. Filehandle references, or objects that support the regular IO operations (like C$fhE> or C<$fh-getline>) are also accepted; the handles must already be opened. If a second argument is given then it should be the name of the desired output file. If the special output filename "-" or ">&STDOUT" is given then the STDOUT filehandle is used for output (and no open or close is performed). If the special output filename ">&STDERR" is given then the STDERR filehandle is used for output (and no open or close is performed). If no output filehandle is currently in use and no output filename is specified, then "-" is implied. Alternatively, filehandle references or objects that support the regular IO operations (like C, e.g. L) are also accepted; the object must already be opened. =head1 ENCODINGS If your Pod is encoded in something other than Latin-1, it should declare an encoding using the L<< perlpod/C<=encoding I> >> directive. =head1 ADDING STOPWORDS You can add stopwords on a per-document basis with C<"=for stopwords"> / C<"=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.) Plural forms are added automatically using L. Words beginning with "!" are I 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 I case; but if the word has any capital letters, then it means that it's okay I with I 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 CE...> or FE...> 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 EE...> sequences in a "stopwords" region, you have to use ":stopwords", as here: =for :stopwords virtE ...meaning that you're adding a stopword of "virtE". If you left the ":" out, that would mean you were adding a stopword of "virtEEugrave>" (with a literal E, a literal <, etc), which will have no effect, since any occurrences of virtEEugrave> don't look like a normal human-language word anyway, and so would be screened out before the stopword list is consulted anyway. =head1 CAVEATS =head2 finding stopwords defined with C<=for> Pod::Spell makes a single pass over the POD. Stopwords must be added B they show up in the POD. =head1 HINT If you feed output of Pod::Spell into your word processor and run a spell-check, make sure you're I 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. =head1 SEE ALSO =over 4 =item * L =item * L =item * L also known as L =item * L, L =back =head1 BUGS Please report any bugs or feature requests on the bugtracker website L or by email to L. 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. =head1 AUTHORS =over 4 =item * Sean M. Burke =item * Caleb Cushing =back =head1 CONTRIBUTORS =for stopwords David Golden Graham Knop Kent Fredric Mohammad S Anwar Olivier Mengué Paulo Custodio =over 4 =item * David Golden =item * Graham Knop =item * Kent Fredric =item * Mohammad S Anwar =item * Olivier Mengué =item * Paulo Custodio =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2024 by Olivier Mengué. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut Pod-Spell-1.27/lib/Pod/Wordlist.pm000644 000766 000024 00000017244 14705245775 017211 0ustar00gknopstaff000000 000000 package Pod::Wordlist; use 5.008; use strict; use warnings; our $VERSION = '1.27'; use Lingua::EN::Inflect 'PL'; use File::Spec (); use constant { _MAXWORDLENGTH => 50, }; use Class::Tiny { wordlist => \&_copy_wordlist, _is_debug => 0, no_wide_chars => 0, }; our %Wordlist; ## no critic ( Variables::ProhibitPackageVars ) sub _copy_wordlist { my %copy; # %Wordlist can be accessed externally, and users will often add terms in # encoded form for my $word ( keys %Wordlist ) { my $decoded_word = $word; # if it was already decoded, this should do nothing utf8::decode($decoded_word); $copy{$decoded_word} = 1; } return \%copy; } BEGIN { my $file; # try to find wordlist in non-installed dist my ($d, $p) = File::Spec->splitpath(__FILE__); $p = File::Spec->catdir($p, (File::Spec->updir) x 2, 'share'); my $full_path = File::Spec->catpath($d, $p, 'wordlist'); if ($full_path && -e $full_path) { $file = $full_path; } if ( not defined $file ) { require File::ShareDir; $file = File::ShareDir::dist_file('Pod-Spell', 'wordlist'); } open my $fh, '<:encoding(UTF-8)', $file or die "Cannot read $file: $!"; ## no critic (ErrorHandling::RequireCarping) while ( defined( my $line = readline $fh ) ) { chomp $line; $Wordlist{$line} = 1; $Wordlist{PL($line)} = 1; } close $fh; } sub learn_stopwords { my ( $self, $text ) = @_; my $stopwords = $self->wordlist; while ( $text =~ m<(\S+)>g ) { my $word = $1; utf8::decode($word); if ( $word =~ m/^!(.+)/s ) { # "!word" deletes from the stopword list my $negation = $1; # different $1 from above delete $stopwords->{$negation}; delete $stopwords->{PL($negation)}; print "Unlearning stopword <$negation>\n" if $self->_is_debug; } else { $word =~ s{'s$}{}; # we strip 's when checking so strip here, too $stopwords->{$word} = 1; $stopwords->{PL($word)} = 1; print "Learning stopword <$word>\n" if $self->_is_debug; } } return; } sub is_stopword { my ($self, $word) = @_; my $stopwords = $self->wordlist; if ( exists $stopwords->{$word} or exists $stopwords->{ lc $word } ) { print " Rejecting <$word>\n" if $self->_is_debug; return 1; } return; } sub strip_stopwords { my ($self, $text) = @_; # Count the things in $text print "Content: <", $text, ">\n" if $self->_is_debug; my @words = grep { length($_) < _MAXWORDLENGTH } split " ", $text; for ( @words ) { print "Parsing word: <$_>\n" if $self->_is_debug; # some spellcheckers can't cope with anything but Latin1 $_ = '' if $self->no_wide_chars && /[^\x00-\xFF]/; # strip leading punctuation s/^[\(\[\{\'\"\:\;\,\?\!\.]+//; # keep everything up to trailing punctuation, not counting # periods (for abbreviations like "Ph.D."), single-quotes # (for contractions like "don't") or colons (for package # names like "Foo::Bar") s/^([^\)\]\}\"\;\,\?\!]+).*$/$1/; # strip trailing single-quote, periods or colons; after this # we have a word that could have internal periods or quotes s/[\.\'\:]+$//; # strip possessive s/'s$//i; # zero out variable names or things with internal symbols, # since those are probably code expressions outside a C<> my $is_sigil = /^[\&\%\$\@\:\<\*\\\_]/; my $is_strange = /[\%\^\&\#\$\@\_\<\>\(\)\[\]\{\}\\\*\:\+\/\=\|\`\~]/; $_ = '' if $is_sigil || $is_strange; # stop if there are no "word" characters left; if it's just # punctuation that we didn't happen to strip or it's weird glyphs, # the spellchecker won't do any good anyway next unless /\w/; print " Checking as <$_>\n" if $self->_is_debug; # replace it with any stopword or stopword parts stripped $_ = $self->_strip_a_word($_); print " Keeping as <$_>\n" if $_ && $self->_is_debug; } return join(" ", grep { defined && length } @words ); } sub _strip_a_word { my ($self, $word) = @_; my $remainder; # try word as-is, including possible hyphenation vs stoplist if ($self->is_stopword($word) ) { $remainder = ''; } # internal period could be abbreviations, so check with # trailing period restored and drop or keep on that basis elsif ( index($word, '.') >= 0 ) { my $abbr = "$word."; $remainder = $self->is_stopword($abbr) ? '' : $abbr; } # check individual parts of hyphenated word, keep whatever isn't a # stopword as individual words elsif ( index($word, '-') >= 0 ) { my @keep; for my $part ( split /-/, $word ) { push @keep, $part if ! $self->is_stopword( $part ); } $remainder = join(" ", @keep) if @keep; } # otherwise, we just keep it else { $remainder = $word; } return $remainder; } 1; __END__ =pod =encoding UTF-8 =for :stopwords Sean M. Burke Caleb Cushing Olivier Mengué =head1 NAME Pod::Wordlist - English words that come up in Perl documentation =head1 VERSION version 1.27 =head1 DESCRIPTION Pod::Wordlist is used by L, providing a set of words that are English jargon words that come up in Perl documentation, but which are not to be found in general English lexicons. (For example: autovivify, backreference, chroot, stringify, wantarray.) You can also use this wordlist with your word processor by just pasting C's content into your wordprocessor, deleting the leading Perl code so that only the wordlist remains, and then spellchecking this resulting list and adding every word in it to your private lexicon. =head1 METHODS =head2 learn_stopwords $wordlist->learn_stopwords( $text ); Modifies the stopword list based on a text block. See the rules for L for details. =head2 is_stopword if ( $wordlist->is_stopword( $word ) ) { ... } Returns true if the word is found in the stopword list. =head2 strip_stopwords my $out = $wordlist->strip_stopwords( $text ); Returns a string with space separated words from the original text with stopwords removed. =head1 ATTRIBUTES =head2 wordlist ref $self->wordlist eq 'HASH'; # true This is the instance of the wordlist =head2 no_wide_chars If true, words with characters outside the Latin-1 range C<0x00> to C<0xFF> will be stripped like stopwords. =head1 WORDLIST Note that the scope of this file is only English, specifically American English. (But you may find in useful to incorporate into your own lexicons, even if they are for other dialects/languages.) remove any q{'s} before adding to the list. The list should be sorted and uniqued. The following will work (with GNU Coreutils ). sort share/wordlist -u > /tmp/sorted && mv /tmp/sorted share/wordlist =head1 BUGS Please report any bugs or feature requests on the bugtracker website L or by email to L. 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. =head1 AUTHORS =over 4 =item * Sean M. Burke =item * Caleb Cushing =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2024 by Olivier Mengué. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut Pod-Spell-1.27/xt/author/000755 000766 000024 00000000000 14705245775 015501 5ustar00gknopstaff000000 000000 Pod-Spell-1.27/xt/release/000755 000766 000024 00000000000 14705245775 015617 5ustar00gknopstaff000000 000000 Pod-Spell-1.27/xt/release/changes_has_content.t000644 000766 000024 00000002100 14705245775 021772 0ustar00gknopstaff000000 000000 use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '1.27'; my $trial_token = '-TRIAL'; my $encoding = 'UTF-8'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); if ($encoding) { require Encode; $changelog = Encode::decode($encoding, $changelog, Encode::FB_CROAK()); } close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } Pod-Spell-1.27/xt/author/mojibake.t000644 000766 000024 00000000151 14705245775 017444 0ustar00gknopstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); Pod-Spell-1.27/xt/author/kwalitee.t000644 000766 000024 00000000275 14705245775 017477 0ustar00gknopstaff000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(); done_testing; Pod-Spell-1.27/xt/author/no-tabs.t000644 000766 000024 00000000722 14705245775 017232 0ustar00gknopstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'bin/podspell', 'lib/Pod/Spell.pm', 'lib/Pod/Wordlist.pm', 't/00-compile.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/basic.t', 't/debug.t', 't/fix_21.t', 't/get-stopwords.t', 't/text-block.t', 't/utf8.t' ); notabs_ok($_) foreach @files; done_testing; Pod-Spell-1.27/xt/author/critic.t000644 000766 000024 00000000210 14705245775 017134 0ustar00gknopstaff000000 000000 #!perl use strict; use warnings; use Test::Perl::Critic %{+{ "-profile" => ".perlcriticrc", "-verbose" => 8, }}; all_critic_ok(); Pod-Spell-1.27/xt/author/minimum-version.t000644 000766 000024 00000000154 14705245775 021024 0ustar00gknopstaff000000 000000 use strict; use warnings; use Test::More; use Test::MinimumVersion; all_minimum_version_from_metayml_ok(); Pod-Spell-1.27/xt/author/test-version.t000644 000766 000024 00000000637 14705245775 020336 0ustar00gknopstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 1.09 use Test::Version; my @imports = qw( version_all_ok ); my $params = { is_strict => 0, has_version => 1, multiple => 0, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; Pod-Spell-1.27/xt/author/eol.t000644 000766 000024 00000000754 14705245775 016453 0ustar00gknopstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'bin/podspell', 'lib/Pod/Spell.pm', 'lib/Pod/Wordlist.pm', 't/00-compile.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/basic.t', 't/debug.t', 't/fix_21.t', 't/get-stopwords.t', 't/text-block.t', 't/utf8.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; Pod-Spell-1.27/xt/author/pod-syntax.t000644 000766 000024 00000000252 14705245775 017773 0ustar00gknopstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Pod-Spell-1.27/xt/author/portability.t000644 000766 000024 00000000163 14705245775 020230 0ustar00gknopstaff000000 000000 use strict; use warnings; use Test::More; use Test::Portability::Files; options(test_one_dot => 0); run_tests(); Pod-Spell-1.27/xt/author/distmeta.t000644 000766 000024 00000000223 14705245775 017475 0ustar00gknopstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use strict; use warnings; use Test::CPAN::Meta; meta_yaml_ok(); Pod-Spell-1.27/xt/author/pod-spell.t000644 000766 000024 00000000704 14705245775 017566 0ustar00gknopstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007005 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ Anwar Burke Caleb Cushing Custodio David Fredric Golden Graham Kent Knop Mengué Mohammad Olivier Paulo Pod Sean Spell Wordlist bin dagolden dolmen haarg kentfredric lib mohammad pauloscustodio podspell sburke xenoterracide Pod-Spell-1.27/xt/author/cpan-changes.t000644 000766 000024 00000000344 14705245775 020216 0ustar00gknopstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CPAN::Changes 0.013 use Test::More 0.96 tests => 1; use Test::CPAN::Changes; subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; Pod-Spell-1.27/xt/author/pod-coverage.t000644 000766 000024 00000000557 14705245775 020250 0ustar00gknopstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Test::Pod::Coverage::TrustMe v1.0.0 use strict; use warnings; use Test::More; use Test::Pod::Coverage::TrustMe; my $config = {}; my $modules = [ "Pod::Spell", "Pod::Wordlist", ]; plan tests => scalar @$modules; for my $module (@$modules) { pod_coverage_ok($module, $config); } done_testing; Pod-Spell-1.27/t/debug.t000644 000766 000024 00000000361 14705245775 015262 0ustar00gknopstaff000000 000000 use strict; use warnings; use Test::More; use Pod::Spell; my $p0 = new_ok 'Pod::Spell' => [ debug => 0 ]; my $p1 = new_ok 'Pod::Spell' => [ debug => 1 ]; ok ! $p0->_is_debug, 'debug unset'; ok $p1->_is_debug, 'debug set'; done_testing; Pod-Spell-1.27/t/fix_21.t000644 000766 000024 00000001141 14705245775 015261 0ustar00gknopstaff000000 000000 use strict; use warnings; use Test::More; use Pod::Spell; use Pod::Wordlist; my $DEBUG = 0; my $w; $w = Pod::Wordlist->new(_is_debug => $DEBUG); $w->learn_stopwords("Ph.D"); is $w->strip_stopwords("Ph.D. John Doe"), "John Doe", "Abbreviation without final dot"; $w = Pod::Wordlist->new(_is_debug => $DEBUG); $w->learn_stopwords("Ph.D."); is $w->strip_stopwords("Ph.D. John Doe"), "John Doe", "Abbreviation with final dot"; $w = Pod::Wordlist->new(_is_debug => $DEBUG); $w->learn_stopwords("anaglyph.pl"); is $w->strip_stopwords("Name: anaglyph.pl"), "Name", "Program name with extension"; done_testing; Pod-Spell-1.27/t/basic.t000644 000766 000024 00000003211 14705245775 015252 0ustar00gknopstaff000000 000000 use strict; use warnings; use Test::More; use File::Temp; use Pod::Spell; use Pod::Wordlist; # realistically we're just checking to make sure the number seems reasonable # and not broken cmp_ok scalar( keys %Pod::Wordlist::Wordlist ), '>=', 1000, 'key count'; my $podfile = File::Temp->new; my $textfile = File::Temp->new; print $podfile "\n=head1 TEST tree's undef\n" . "\n=for stopwords zpaph DDGGSS's myormsp pleumgh bruble-gruble\n" . "\n=for :stopwords !myormsp furble\n\n Glakq\n" . "\nPleumgh bruble-gruble DDGGSS's zpaph's zpaph-kafdkaj-snee myormsp snickh furbles.\n" . "\nFoo::Bar \$a \@b \%c __PACKAGE__->mumble() Foo->{\$bar}\n" . qq[\n"'" Kh.D. ('WinX32'.) L's\n] . qq[\nbeforecode C aftercode\n] . qq[\nbeforespacecodeC< inspacecode >afterspacecode\n] . qq[\nbeforejoinedcodeCafterjoinedcode\n] . qq[\nbeforeprecodeCafterprecode\n] . qq[\nbeforepostcodeC< inpostcode>afterpostcode\n] . qq[\nbeforeescapecodeC inescapecode>afterescapecode\n] . qq[\n] ; # reread from beginning $podfile->seek( 0, 0 ); my $p = new_ok 'Pod::Spell' => [ debug => 1 ]; $p->parse_from_filehandle( $podfile, $textfile ); # reread from beginning $textfile->seek( 0, 0 ); my $in = do { local $/ = undef, <$textfile> }; my @words = split " ", $in; my @expected = qw( TEST tree kafdkaj snee myormsp snickh Kh.D. WinX32 s beforecode aftercode beforespacecode afterspacecode afterprecode beforepostcode ); is scalar @words, scalar @expected, 'word count'; is_deeply [ sort @words ], [ sort @expected ], 'words match' or diag "@words"; done_testing; Pod-Spell-1.27/t/00-compile.t000644 000766 000024 00000005331 14705245775 016043 0ustar00gknopstaff000000 000000 use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More; plan tests => 3 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Pod/Spell.pm', 'Pod/Wordlist.pm' ); my @scripts = ( 'bin/podspell' ); # no fake home requested my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } foreach my $file (@scripts) { SKIP: { open my $fh, '<', $file or warn("Unable to open $file: $!"), next; my $line = <$fh>; close $fh and skip("$file isn't perl", 1) unless $line =~ /^#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/; @switches = (@switches, split(' ', $1)) if $1; close $fh and skip("$file uses -T; not testable with PERL5LIB", 1) if grep { $_ eq '-T' } @switches and $ENV{PERL5LIB}; my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-c', $file)) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$file compiled ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; # in older perls, -c output is simply the file portion of the path being tested if (@_warnings = grep { !/\bsyntax OK$/ } grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings) { warn @_warnings; push @warnings, @_warnings; } } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; Pod-Spell-1.27/t/00-report-prereqs.t000644 000766 000024 00000013601 14705245775 017404 0ustar00gknopstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.029 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if grep { $_ eq $mod } @exclude; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; if ($mod eq 'perl') { push @reports, ['perl', $want, $]]; next; } my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass('Reported prereqs'); # vim: ts=4 sts=4 sw=4 et: Pod-Spell-1.27/t/get-stopwords.t000644 000766 000024 00000001014 14705245775 017011 0ustar00gknopstaff000000 000000 use strict; use warnings; use Test::More; use Pod::Wordlist; my $p = new_ok 'Pod::Wordlist'; $p->learn_stopwords( 'foo bar baz' ); ok exists $p->wordlist->{foo}, 'stopword added: foo'; ok exists $p->wordlist->{bar}, 'stopword added: bar'; ok exists $p->wordlist->{baz}, 'stopword added: baz'; $p->learn_stopwords( '!foo' ); ok ! exists $p->wordlist->{foo}, 'stopword removed: foo'; ok exists $p->wordlist->{bar}, 'stopword still exists: bar'; ok exists $p->wordlist->{baz}, 'stopword still exists: baz'; done_testing; Pod-Spell-1.27/t/00-report-prereqs.dd000644 000766 000024 00000005542 14705245775 017535 0ustar00gknopstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::ShareDir::Install' => '0.06' }, 'suggests' => { 'JSON::PP' => '2.27300' } }, 'develop' => { 'requires' => { 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta' => '0', 'Test::EOL' => '0', 'Test::Kwalitee' => '1.21', 'Test::MinimumVersion' => '0', 'Test::Mojibake' => '0', 'Test::More' => '0.88', 'Test::NoTabs' => '0', 'Test::Perl::Critic' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage::TrustMe' => '0', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', 'Test::Version' => '1' } }, 'runtime' => { 'requires' => { 'Carp' => '0', 'Class::Tiny' => '0', 'File::ShareDir' => '0', 'Lingua::EN::Inflect' => '0', 'POSIX' => '0', 'Pod::Escapes' => '0', 'Pod::Simple' => '3.27', 'Text::Wrap' => '0', 'constant' => '0', 'locale' => '0', 'parent' => '0', 'perl' => '5.008001' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'File::Temp' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Test::More' => '0.88' } } }; $x; }Pod-Spell-1.27/t/text-block.t000644 000766 000024 00000001155 14705245775 016252 0ustar00gknopstaff000000 000000 use strict; use warnings; use Test::More; use File::Temp; use Pod::Spell; my $podfile = File::Temp->new; my $textfile = File::Temp->new; print $podfile "\n=head1 TEST undef\n" . "\n=begin stopwords\n" . "\nPleumgh zpaph myormsp snickh\n\n" . "\nblah blargh bazh\n\n" . "\n=end stopwords\n" ; # reread from beginning $podfile->seek( 0, 0 ); my $p = new_ok 'Pod::Spell' => [ debug => 1 ]; $p->parse_from_filehandle( $podfile, $textfile ); my $wordlist = $p->stopwords->wordlist; ok $wordlist->{$_}, "stopword added: $_" for qw( Pleumgh zpaph myormsp snickh blah blargh bazh ); done_testing; Pod-Spell-1.27/t/utf8.t000644 000766 000024 00000006520 14705245775 015065 0ustar00gknopstaff000000 000000 use 5.008; # for utf8 use strict; use warnings; use utf8; use Test::More; use File::Temp; use Pod::Spell; use Pod::Wordlist; my $builder = Test::More->builder; binmode $builder->output, ":utf8"; binmode $builder->failure_output, ":utf8"; binmode $builder->todo_output, ":utf8"; binmode STDOUT, ":utf8"; my $podfile = File::Temp->new; binmode($podfile, ":utf8"); print $podfile <<'ENDPOD'; =encoding utf8 =for :stopwords virtE résumé =head1 Testing virtE & résumé Our virtE & virtù & résumé for Mengué in 日本 =cut ENDPOD my @cases = ( { label => "wide chars allowed", options => {}, expected => [ qw( Testing Our for Mengué in 日本 ) ], }, { label => "wide chars stripped", options => { no_wide_chars => 1 }, expected => [ qw( Testing Our for Mengué in ) ], }, ); for my $c ( @cases ) { my $check = sub { my ($name, $content) = @_; my @words = split " ", $content; my @expected = @{ $c->{expected} }; is scalar @words, scalar @expected, "$c->{label}: word count"; is_deeply [ sort @words ], [ sort @expected ], "$name - $c->{label}: words match" or diag "@words"; }; my $parse = sub { my $p = Pod::Spell->new( %{ $c->{options} }); $podfile->seek( 0, 0 ); $p->parse_from_filehandle( $podfile, @_ ); }; { my $textfile = File::Temp->new( 'pod-spell-XXXXX', TMPDIR => 1, UNLINK => 1 ); $parse->($textfile); $textfile->seek( 0, 0 ); my $content = do { local $/; <$textfile> }; $check->('temp file', Encode::decode_utf8($content)); } { my $textfile = File::Temp->new( 'pod-spell-XXXXX', TMPDIR => 1, UNLINK => 1 ); binmode $textfile, ':utf8'; $parse->($textfile); $textfile->seek( 0, 0 ); my $content = do { local $/; <$textfile> }; $check->('temp file (utf8)', $content); } { my $content = ''; open my $fh, '>', \$content; $parse->($fh); $check->('in memory', Encode::decode_utf8($content)); } { my $content = ''; open my $fh, '>:utf8', \$content; $parse->($fh); $check->('in memory (utf8)', Encode::decode_utf8($content)); } { open(my $oldout, '>&', \*STDOUT) or die "Can't dup STDOUT: $!"; my ($fh, $file) = File::Temp::tempfile( 'pod-spell-XXXXX', TMPDIR => 1, UNLINK => 1 ); open(STDOUT, '>', $file) or die "Can't redirect STDOUT: $!"; $parse->(); open(STDOUT, '>&', $oldout) or die "Can't dup \$oldout: $!"; seek $fh, 0, 0; my $content = do { local $/; <$fh> }; $check->('STDOUT', Encode::decode_utf8($content)); } { open(my $oldout, '>&', \*STDOUT) or die "Can't dup STDOUT: $!"; my ($fh, $file) = File::Temp::tempfile( 'pod-spell-XXXXX', TMPDIR => 1, UNLINK => 1 ); open(STDOUT, '>:utf8', $file) or die "Can't redirect STDOUT: $!"; $parse->(); close STDOUT; open(STDOUT, '>&', $oldout) or die "Can't dup \$oldout: $!"; seek $fh, 0, 0; my $content = do { local $/; <$fh> }; $check->('STDOUT (utf8)', Encode::decode_utf8($content)); } } done_testing; Pod-Spell-1.27/bin/podspell000755 000766 000024 00000002762 14705245775 016073 0ustar00gknopstaff000000 000000 #!/usr/bin/perl use 5.008001; use strict; use warnings; our $VERSION = '1.27'; use Pod::Spell; # Try to get the encoding from the locale my $encoding = eval { require POSIX; POSIX::setlocale(POSIX::LC_CTYPE(), ''); require I18N::Langinfo; I18N::Langinfo::langinfo(I18N::Langinfo::CODESET()) }; if ($encoding) { binmode(STDOUT, ":encoding($encoding)"); } if(@ARGV) { # iterate over files, sending to STDOUT foreach my $x (@ARGV) { Pod::Spell->new->parse_from_file($x, '-'); } } else { # take from STDIN, send to STDOUT Pod::Spell->new->parse_from_filehandle(); } __END__ =pod =encoding UTF-8 =for :stopwords Sean M. Burke Caleb Cushing Olivier Mengué =head1 NAME podspell - pod spell checking command line interface =head1 VERSION version 1.27 =head1 SYNOPSIS % podspell Thing.pm | ispell =head1 BUGS Please report any bugs or feature requests on the bugtracker website L or by email to L. 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. =head1 AUTHORS =over 4 =item * Sean M. Burke =item * Caleb Cushing =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2024 by Olivier Mengué. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut