File Coverage

blib/lib/Pod/Weaver/PluginBundle/Author/CCM.pm
Criterion Covered Total %
statement 14 34 41.1
branch 0 12 0.0
condition 0 5 0.0
subroutine 5 9 55.5
pod 2 2 100.0
total 21 62 33.8


line stmt bran cond sub pod time code
1             # ABSTRACT: A plugin bundle for pod woven by CCM
2              
3              
4             use 5.008;
5 1     1   1189 use warnings;
  1         3  
6 1     1   5 use strict;
  1         2  
  1         24  
7 1     1   4  
  1         2  
  1         33  
8             our $VERSION = '0.010'; # VERSION
9              
10             use Pod::Weaver::Config::Assembler;
11 1     1   425 use namespace::autoclean;
  1         361012  
  1         37  
12 1     1   8  
  1         2  
  1         10  
13              
14             return (
15             ['-EnsurePod5'],
16             ['-H1Nester'],
17 0     0 1   ['-SingleEncoding'],
18              
19             ['-Transformer' => List => {transformer => 'List'}],
20             ['-Transformer' => Verbatim => {transformer => 'Verbatim'}],
21              
22             ['Region' => 'header'],
23              
24             'Name',
25             # ['Badges' => {badge => [qw(perl travis coverage)], formats => 'html, markdown'}],
26              
27             'Version',
28              
29             ['Region' => 'prelude'],
30              
31             ['Generic' => 'SYNOPSIS'],
32             ['Generic' => 'DESCRIPTION'],
33             ['Generic' => 'OVERVIEW'],
34             ['Collect' => 'ATTRIBUTES' => {command => 'attr'}],
35             ['Collect' => 'METHODS' => {command => 'method'}],
36             ['Collect' => 'FUNCTIONS' => {command => 'func'}],
37              
38             'Leftovers',
39              
40             ['Region' => 'postlude'],
41              
42             'Bugs',
43             'Authors',
44             'Contributors',
45             'Legal',
46              
47             ['Region' => 'footer'],
48             );
49             }
50              
51              
52             my $self = shift || __PACKAGE__;
53              
54             return map { $self->_expand_config($_) } $self->configure;
55 0   0 0 1   }
56              
57 0            
  0            
58             my $self = shift;
59             my $spec = shift;
60 0     0      
61             my ($name, $package, $payload);
62              
63 0     0     if (!ref $spec) {
64 0           ($name, $package, $payload) = ($spec, $spec, {});
65             }
66 0           elsif (@$spec == 1) {
67             ($name, $package, $payload) = (@$spec[0,0], {});
68 0 0         }
    0          
    0          
69 0           elsif (@$spec == 2) {
70             ($name, $package, $payload) = ref $spec->[1] ? @$spec[0,0,1] : (@$spec[1,0], {});
71             }
72 0           else {
73             ($package, $name, $payload) = @$spec;
74             }
75 0 0          
76             $name =~ s/^[@=-]//;
77             $package = _exp($package);
78 0            
79             if ($package eq _exp('Region')) {
80             $name = $spec->[1];
81 0           $payload = {region_name => $spec->[1], %$payload};
82 0           }
83              
84 0 0         $name = '@Author::CCM/' . $name if $package ne _exp('Generic') && $package ne _exp('Collect');
85 0            
86 0           return [$name => $package => $payload];
87             }
88              
89 0 0 0       1;
90              
91 0            
92             =pod
93              
94             =encoding UTF-8
95              
96             =head1 NAME
97              
98             Pod::Weaver::PluginBundle::Author::CCM - A plugin bundle for pod woven by CCM
99              
100             =head1 VERSION
101              
102             version 0.010
103              
104             =head1 SYNOPSIS
105              
106             # In your weaver.ini file:
107             [@Author::CCM]
108              
109             # In your dist.ini file:
110             [PodWeaver]
111             config_plugin = @Author::CCM
112              
113             =head1 DESCRIPTION
114              
115             You probably don't want to use this.
116              
117             =head1 METHODS
118              
119             =head2 configure
120              
121             Returns the configuration in a form similar to what one might use with
122             L<Dist::Zilla::Role::PluginBundle::Easy/add_plugins>.
123              
124             =head2 mvp_bundle_config
125              
126             Required in order to be a plugin bundle.
127              
128             =head1 SEE ALSO
129              
130             =over 4
131              
132             =item *
133              
134             L<Pod::Weaver>
135              
136             =item *
137              
138             L<Pod::Weaver::PluginBundle::Author::ETHER>
139              
140             =back
141              
142             =head1 CREDITS
143              
144             This module was heavily inspired by Karen Etheridge's config.
145              
146             =head1 BUGS
147              
148             Please report any bugs or feature requests on the bugtracker website
149             L<https://github.com/chazmcgarvey/Dist-Zilla-PluginBundle-Author-CCM/issues>
150              
151             When submitting a bug or request, please include a test-file or a
152             patch to an existing test-file that illustrates the bug or desired
153             feature.
154              
155             =head1 AUTHOR
156              
157             Charles McGarvey <ccm@cpan.org>
158              
159             =head1 COPYRIGHT AND LICENSE
160              
161             This software is copyright (c) 2016 by Charles McGarvey.
162              
163             This is free software; you can redistribute it and/or modify it under
164             the same terms as the Perl 5 programming language system itself.
165              
166             =cut