table of contents
Pod::Weaver::Section::GenerateSection(3pm) | User Contributed Perl Documentation | Pod::Weaver::Section::GenerateSection(3pm) |
NAME¶
Pod::Weaver::Section::GenerateSection - add pod section from an interpolated piece of text
VERSION¶
version 1.06
SYNOPSIS¶
In your weaver.ini
[GenerateSection] title = HOMEPAGE text = This is the POD for distribution {{$name}}. Check out what we have text = been up to at {{$homepage}}
The title value can be omited if passed as the plugin name:
[GenerateSection / HOMEPAGE]
DESCRIPTION¶
This plugin attempts to be a cross between Pod::Weaver::Section::Template and Dist::Zilla::Plugin::GenerateFile without the generation of extra files.
The values of text are concatenated and variable names with matching values on the distribution are interpolated. Specifying the heading level allows one to write down a rather long section of POD text without need for extra files. For example:
[GenerateSection / FEEDBACK] head = 1 [GenerateSection / Reporting bugs] head = 2 text = Please report bugs when you find them. While we do have a mailing text = list, please use the bug tracker at {{$bugtracker_web}} text = to report bugs [GenerateSection / Homegape] head = 2 text = Also, come check out our other projects at text = {{$homepage}}
ATTRIBUTES¶
text¶
The text to be added to the section. Multiple values are allowed and will be concatenated. Certain sequences on the text will be replaced (see below).
head¶
The heading level of this section. If 0, there will be no heading. Defaults to 1.
title¶
The title for this section. It can optionally be omitted and passed as the plugin name.
main_module_only¶
If true, it will add the text only to the main module POD. Defaults to false.
is_template¶
If false, it will not attempt to replace the {{}} entries on text. Defaults to true.
Text as template¶
Unless the option "is_template" is false, the text will be run through Text::Template. The variables $plugin, $dist, and $distmeta will be provided, set to the GenerateSection plugin, "Dist::Zilla" object, and the distribution metadata hash respectively. For convenience, the following variables are also set:
- $name
- $version
- $homepage
- $repository_web
- $repository_url
- $bugtracker_web
- $bugtracker_email
AUTHOR¶
Carnë Draug <cdraug@cpan.org>
COPYRIGHT AND LICENSE¶
This software is Copyright (c) 2013-2017 by Carnë Draug.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
2021-01-08 | perl v5.32.0 |