The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dist::Zilla::Stash::PodWeaver - A stash of config options for Pod::Weaver

VERSION

version 1.004

SYNOPSIS

  # dist.ini

  [@YourFavoritePluginBundle]

  [%PodWeaver]
  -StopWords.include = WordsIUse ThatAreNotWords

DESCRIPTION

This performs the Dist::Zilla::Role::Stash role (using Dist::Zilla::Role::DynamicConfig and Dist::Zilla::Role::Stash::Plugins).

When using Dist::Zilla::Plugin::PodWeaver with a config_plugin it's difficult to pass more configuration options to Pod::Weaver plugins.

This is often the case when using a Dist::Zilla::PluginBundle that uses a Pod::Weaver::PluginBundle.

This stash is intended to allow you to set other options in your dist.ini that can be accessed by Pod::Weaver plugins.

Because you know how you like your dists built, (and you're using PluginBundles to do it) but you need a little extra customization.

USAGE

The attributes should be separated from the plugin name with a dot: PluginName.attributes. The PluginName will be passed to Pod::Weaver::Config::Assembler->expand_package() so the PluginName should include the leading character to identify its type:

  • (no character) (Pod::Weaver::Section::Name)

  • - Plugin (Pod::Weaver::Plugin::Name)

  • @ Bundle (Pod::Weaver::PluginBundle::Name)

  • + Full Package Name (Name)

    An ini config line cannot start with an = so this module will convert any lines that start with + to = .

For example

  Complaints.use_fake_email = 1

Would set the 'use_fake_email' attribute to '1' for the [fictional] Pod::Weaver::Section::Complaints plugin.

  -StopWords.include = Flibberoloo

Would add 'Flibberoloo' to the list of stopwords added by the Pod::Weaver::Plugin::StopWords plugin.

  +Some::Other::Module.silly = 1

Would set the 'silly' flag to true on Some::Other::Module.

METHODS

expand_package

Expand shortened package monikers to the full package name.

Changes leading + to = and then passes the value to expand_package in Pod::Weaver::Config::Assembler.

See "USAGE" for a description.

BUGS AND LIMITATIONS

  • Arguments can only be specified in a dist.ini stash once, even if the plugin would normally allow multiple entries in a weaver.ini. Since the arguments are dynamic (unknown to the class) the class cannot specify which arguments should accept multiple values.

    To work around this you can add brackets (and subscripts) to config lines to specify that an attribute is an array:

      Plugin.attr[0] = first
      Plugin.attr[1] = second

    See "CONFIGURATION SYNTAX" in Config::MVP::Slicer for more information.

  • Including the package name gives the options a namespace (instead of trying to set the include attribute for 2 different plugins).

    Unfortunately this does not automatically set the options on the plugins. The plugins need to know to use this stash.

    So if you'd like to be able to use this stash with a Pod::Weaver plugin that doesn't support it, please contact that plugin's author(s) and let them know about this module.

    If you are a Pod::Weaver plugin author, have a look at "get_stashed_config" in Dist::Zilla::Role::Stash::Plugins and "merge_stashed_config" in Dist::Zilla::Role::Stash::Plugins to see easy ways to get values from this stash.

    Please contact me (and/or send patches) if something doesn't work like you think it should.

SUPPORT

Perldoc

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

  perldoc Dist::Zilla::Stash::PodWeaver

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-dist-zilla-stash-podweaver at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dist-Zilla-Stash-PodWeaver. You will be automatically notified of any progress on the request by the system.

Source Code

https://github.com/rwstauner/Dist-Zilla-Stash-PodWeaver

  git clone https://github.com/rwstauner/Dist-Zilla-Stash-PodWeaver.git

AUTHOR

Randy Stauner <rwstauner@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.