NAME

Pod::Weaver::Plugin::StopWords - Dynamically add stopwords to your woven pod

VERSION

version 1.007

SYNOPSIS

# weaver.ini
[-StopWords]
gather = 1     ; default
include = MyExtraWord1 exword2

DESCRIPTION

This is a Pod::Weaver plugin for dynamically adding stopwords to help pass the Pod Spelling test. It does the Pod::Weaver::Role::Finalizer role.

Author names will be included along with any stopwords specified in the plugin config (weaver.ini).

Additionally the plugin can gather any other stopwords listed in the POD and compile them all into one paragraph at the top of the document.

Using with Dist::Zilla

If you're using Dist::Zilla this plugin will check for the %PodWeaver Stash (Dist::Zilla::Stash::PodWeaver) and load any additional configuration found there. So you can specify additional stopwords (or any other attributes) in your dist.ini:

; dist.ini
[@YourFavoriteBundle]
[%PodWeaver]
-StopWords.include = favorite_fake_word

ATTRIBUTES

exclude

List of stopwords to explicitly exclude.

This can be set multiple times.

If combined with 'gather' this can remove stopwords previously found in the Pod.

gather

Gather up all other =for stopwords sections and combine them into a single paragraph at the top of the document.

If set to false the plugin will not search the document but will simply put any new stopwords in a new paragraph at the top.

Defaults to true.

Aliased as collect.

include

List of stopwords to include.

This can be set multiple times.

Aliased as stopwords.

include_authors

A boolean value to indicate whether or not to include Author names as stopwords. The pod spell check always complained about my last name appearing in the AUTHOR section. It's one of the primary reasons for developing this plugin.

Defaults to true.

A boolean value to indicate whether or not to include stopwords for the license/copyright holder. This can be different than the author and will show up in the default LICENSE Section.

This way you don't have to remember to put your company name into the %PodWeaver Stash for every single dist.ini you have at $work.

Defaults to true.

wrap

This is an integer for the number of columns at which to wrap the resulting paragraph.

It defaults to 76 which is the default in Text::Wrap (version 2009.0305).

No wrapping will be done if Text::Wrap is not found or if you set this value to 0.

METHODS

author_stopwords

Collect names of authors from provided authors array. Ignore email addresses (since Pod::Spell will ignore them anyway).

format_stopwords

Format the final paragraph to be added to the document. Uses Text::Wrap if available and the wrap attribute is set to a positive number (the column at which to wrap text).

separate_stopwords

Flatten passed arrays and arrayrefs and split the strings inside by whitespace to return a flat list of words.

splice_stopwords_from_children

Look for any previous stopwords paragraphs in the document, capture the stopwords inside, and remove the paragraphs from the document.

This is only called if gather is true.

SEE ALSO

SUPPORT

Perldoc

You can find documentation for this module with the perldoc command.

perldoc Pod::Weaver::Plugin::StopWords

Websites

The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.

Bugs / Feature Requests

Please report any bugs or feature requests by email to bug-pod-weaver-plugin-stopwords at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Pod-Weaver-Plugin-StopWords. You will be automatically notified of any progress on the request by the system.

Source Code

https://github.com/rwstauner/Pod-Weaver-Plugin-StopWords

git clone https://github.com/rwstauner/Pod-Weaver-Plugin-StopWords.git

AUTHOR

Randy Stauner <rwstauner@cpan.org>

CONTRIBUTORS

  • Apocalypse <apocal@cpan.org>

  • Karen Etheridge <ether@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Randy Stauner.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.