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.
32 our $VERSION = '999.999'; # VERSION
34 use Pod
::Weaver
::Config
::Assembler
;
35 use namespace
::autoclean
;
39 Returns the configuration
in a form similar to what one might
use with
40 L
<Dist
::Zilla
::Role
::PluginBundle
::Easy
/add_plugins
>.
50 ['-Transformer' => List
=> {transformer
=> 'List'}],
51 ['-Transformer' => Verbatim
=> {transformer
=> 'Verbatim'}],
53 ['Region' => 'header'],
56 # ['Badges' => {badge => [qw(perl travis coverage)], formats => 'html, markdown'}],
60 ['Region' => 'prelude'],
62 ['Generic' => 'SYNOPSIS'],
63 ['Generic' => 'DESCRIPTION'],
64 ['Generic' => 'OVERVIEW'],
65 ['Collect' => 'ATTRIBUTES' => {command
=> 'attr'}],
66 ['Collect' => 'METHODS' => {command
=> 'method'}],
67 ['Collect' => 'FUNCTIONS' => {command
=> 'func'}],
71 ['Region' => 'postlude'],
78 ['Region' => 'footer'],
82 =method mvp_bundle_config
84 Required
in order to be a plugin bundle
.
88 sub mvp_bundle_config
{
89 my $self = shift || __PACKAGE__
;
91 return map { $self->_expand_config($_) } $self->configure;
94 sub _exp
{ Pod
::Weaver
::Config
::Assembler-
>expand_package($_[0]) }
100 my ($name, $package, $payload);
103 ($name, $package, $payload) = ($spec, $spec, {});
105 elsif (@$spec == 1) {
106 ($name, $package, $payload) = (@$spec[0,0], {});
108 elsif (@$spec == 2) {
109 ($name, $package, $payload) = ref $spec->[1] ? @$spec[0,0,1] : (@$spec[1,0], {});
112 ($package, $name, $payload) = @$spec;
116 $package = _exp
($package);
118 if ($package eq _exp
('Region')) {
120 $payload = {region_name
=> $spec->[1], %$payload};
123 $name = '@Author::CCM/' . $name if $package ne _exp
('Generic') && $package ne _exp
('Collect');
125 return [$name => $package => $payload];