1 package Pod
::Weaver
::PluginBundle
::Author
::CCM
;
2 # ABSTRACT: A plugin bundle for pod woven by CCM
6 # In your weaver.ini file:
9 # In your dist.ini file:
11 config_plugin = @Author::CCM
15 You probably don't want to use this.
21 * L<Pod::Weaver::PluginBundle::Author::ETHER>
25 This module was heavily inspired by Karen Etheridge's config.
33 our $VERSION = '999.999'; # VERSION
35 use Pod
::Weaver
::Config
::Assembler
;
36 use namespace
::autoclean
;
40 Returns the configuration
in a form similar to what one might
use with
41 L
<Dist
::Zilla
::Role
::PluginBundle
::Easy
/add_plugins
>.
51 ['-Transformer' => List
=> {transformer
=> 'List'}],
52 ['-Transformer' => Verbatim
=> {transformer
=> 'Verbatim'}],
54 ['Region' => 'header'],
57 # ['Badges' => {badge => [qw(perl travis coverage)], formats => 'html, markdown'}],
61 ['Region' => 'prelude'],
63 ['Generic' => 'SYNOPSIS'],
64 ['Generic' => 'DESCRIPTION'],
65 ['Generic' => 'OVERVIEW'],
66 ['Collect' => 'ATTRIBUTES' => {command
=> 'attr'}],
67 ['Collect' => 'METHODS' => {command
=> 'method'}],
68 ['Collect' => 'FUNCTIONS' => {command
=> 'func'}],
72 ['Region' => 'postlude'],
79 ['Region' => 'footer'],
83 =method mvp_bundle_config
85 Required
in order to be a plugin bundle
.
89 sub mvp_bundle_config
{
90 my $self = shift || __PACKAGE__
;
92 return map { $self->_expand_config($_) } $self->configure;
95 sub _exp
{ Pod
::Weaver
::Config
::Assembler-
>expand_package($_[0]) }
101 my ($name, $package, $payload);
104 ($name, $package, $payload) = ($spec, $spec, {});
106 elsif (@$spec == 1) {
107 ($name, $package, $payload) = (@$spec[0,0], {});
109 elsif (@$spec == 2) {
110 ($name, $package, $payload) = ref $spec->[1] ? @$spec[0,0,1] : (@$spec[1,0], {});
113 ($package, $name, $payload) = @$spec;
117 $package = _exp
($package);
119 if ($package eq _exp
('Region')) {
121 $payload = {region_name
=> $spec->[1], %$payload};
124 $name = '@Author::CCM/' . $name if $package ne _exp
('Generic') && $package ne _exp
('Collect');
126 return [$name => $package => $payload];