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.174';
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',
[ 'GenerateSection' => 'generate VERSION' => {
title => 'VERSION',
main_module_only => 0,
text => [ <<'VERSION',
version {{ join "\n\n",
$version,
$dist->is_trial ? 'This is a trial release!' : (),
$version < '1.0' && $version !~ /\..+\./ ? "I use a linearly-increasing version numbering scheme. No meaning should be\npresumed or inferred from the version being less than 1.0." : (),
}}
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 }}>
( run in 0.548 second using v1.01-cache-2.11-cpan-ad19def0cd9 )