Dist-Zilla-PluginBundle-Author-ETHER
view release on metacpan or search on metacpan
lib/Pod/Weaver/PluginBundle/Author/ETHER.pm view on Meta::CPAN
use strict;
use warnings;
package Pod::Weaver::PluginBundle::Author::ETHER;
# vim: set ts=8 sts=2 sw=2 tw=100 et :
# ABSTRACT: A plugin bundle for pod woven by ETHER
our $VERSION = '0.172';
use if "$]" >= 5.022, experimental => 're_strict';
no if "$]" >= 5.031009, feature => 'indirect';
no if "$]" >= 5.033001, feature => 'multidimensional';
no if "$]" >= 5.033006, feature => 'bareword_filehandles';
no if "$]" >= 5.041009, feature => 'smartmatch';
no feature 'switch';
use namespace::autoclean -also => ['_exp'];
use Pod::Weaver::Config::Assembler;
use Module::Runtime 'use_module';
use PadWalker 'peek_sub';
sub _exp { Pod::Weaver::Config::Assembler->expand_package($_[0]) }
# This sub behaves somewhat like a Dist::Zilla pluginbundle's configure() -- it returns a list of strings or 1, 2
# or 3-element arrayrefs containing plugin specifications. The goal is to make this look as close to what
# weaver.ini looks like as possible.
sub configure {
my $self = shift;
# I wouldn't have to do this ugliness if I could have some configuration values passed in from weaver.ini or
# the [PodWeaver] plugin's use of config_plugin (where I could define a 'licence' option)
my $podweaver_plugin = ${ peek_sub(\&Dist::Zilla::Plugin::PodWeaver::weaver)->{'$self'} };
my $licence_plugin = $podweaver_plugin && $podweaver_plugin->zilla->plugin_named('@Author::ETHER/License');
my $licence_filename = $licence_plugin ? $licence_plugin->filename : 'LICENCE';
return (
# equivalent to [@CorePrep]
[ '-EnsurePod5' ],
[ '-H1Nester' ],
'-SingleEncoding',
[ '-Transformer' => List => { transformer => 'List' } ],
[ '-Transformer' => Verbatim => { transformer => 'Verbatim' } ],
[ 'Region' => 'header' ],
'Name',
'Version',
[ 'Region' => 'prelude' ],
[ 'Generic' => 'SYNOPSIS' ],
[ 'Generic' => 'DESCRIPTION' ],
[ 'Generic' => 'OVERVIEW' ],
[ 'Collect' => 'ATTRIBUTES' => { command => 'attr' } ],
[ 'Collect' => 'METHODS' => { command => 'method' } ],
[ 'Collect' => 'FUNCTIONS' => { command => 'func' } ],
[ 'Collect' => 'TYPES' => { command => 'type' } ],
'Leftovers',
[ 'Region' => 'postlude' ],
[ 'GenerateSection' => 'generate GIVING THANKS' => {
title => 'GIVING THANKS',
main_module_only => 0,
text => [ '='.<<'THANKS',
for stopwords MetaCPAN GitHub
If you found this module to be useful, please show your appreciation by
adding a +1 in L<MetaCPAN|https://metacpan.org/dist/{{ $name }}>
and a star in L<GitHub|{{ $repository_web }}>.
THANKS
] },
],
[ 'GenerateSection' => 'generate SUPPORT' => {
title => 'SUPPORT',
main_module_only => 0,
text => [ <<'SUPPORT',
{{ join("\n\n",
($bugtracker_email && $bugtracker_email =~ /rt\.cpan\.org/)
? "Bugs may be submitted through L<the RT bug tracker|$bugtracker_web>\n(or L<$bugtracker_email|mailto:$bugtracker_email>)."
: $bugtracker_web
? "Bugs may be submitted through L<$bugtracker_web>."
( run in 1.289 second using v1.01-cache-2.11-cpan-99c4e6809bf )