Pod/Weaver/PluginBundle/Author/ZMUGHAL/ProjectRenard.pm untested

filter: Statementstmt 0.0% 0 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 47 CC 1 SCAR 6.9
CC
1
Cov
0%
_exp
2.0
mvp_bundle_config
2.0
_region
2.0
CRAP 2.0
1 use strict;
2 use warnings;
3 package Pod::Weaver::PluginBundle::Author::ZMUGHAL::ProjectRenard;
4 # ABSTRACT: A plugin bundle for pod woven for Project Renard
5 $Pod::Weaver::PluginBundle::Author::ZMUGHAL::ProjectRenard::VERSION = '0.006';
6 use Pod::Weaver::Config::Assembler;
7  
8 our $PB_NAME = '@Author::ZMUGHAL::ProjectRenard';
9  
10 sub _exp { Pod::Weaver::Config::Assembler->expand_package($_[0]) }
11  
12 sub mvp_bundle_config {
13 return (
14 # [@CorePrep]
15 [ "$PB_NAME/CorePrep" , _exp('@CorePrep') , {} ],
16 # [-Transformer]
17 # transformer = List
18 [ "$PB_NAME/TransList" , _exp('-Transformer') , { transformer => 'List' } ],
19 # [-SingleEncoding]
20 [ "$PB_NAME/SingleEncoding" , _exp('-SingleEncoding') , {} ],
21  
22 # [Region / header]
23 _region('Header'),
24 # [Name]
25 [ "$PB_NAME/Name" , _exp('Name') , {} ],
26 # [Version]
27 [ "$PB_NAME/Version" , _exp('Version') , {} ],
28  
29 ### Prelude
30 # [Region / prelude]
31 _region('Prelude'),
32 # [Generic / SYNOPSIS]
33 _generic("Synopsis"),
34 # [Generic / DESCRIPTION]
35 _generic("Description"),
36 # [Generic / OVERVIEW]
37 _generic("Overview"),
38  
39 ### Object hierarchy
40 # [Extends]
41 [ "$PB_NAME/Extends" , _exp('Extends') , {} ],
42 # [Consumes]
43 [ "$PB_NAME/Consumes" , _exp('Consumes') , {} ],
44  
45 ### Package members
46  
47 # [Collect / FUNCTIONS]
48 # command = func
49 _collect("Functions", 'func', 'FUNCTIONS'),
50  
51 # [Collect / TYPES]
52 # command = type
53 _collect("Types", 'type', 'TYPES'),
54  
55 # [Collect / METHODS REQUIRED BY THIS ROLE]
56 # command = requires
57 _collect("RoleRequires", 'requires', 'METHODS REQUIRED BY THIS ROLE'),
58  
59 # [Collect / ATTRIBUTES]
60 # command = attr
61 _collect("Attributes", 'attr', 'ATTRIBUTES'),
62  
63 # [Collect / CLASS METHODS]
64 # command = classmethod
65 _collect("ClassMethods", 'classmethod', 'CLASS METHODS'),
66  
67 # [Collect / METHODS]
68 # command = method
69 _collect("Methods", 'method', 'METHODS'),
70  
71 # [Collect / CALLBACKS]
72 # command = callback
73 _collect("Callbacks", 'callback', 'CALLBACKS'),
74  
75 # [Collect / SIGNALS]
76 # command = signal
77 _collect('Signals', 'signal', 'SIGNALS'),
78  
79 ### Rest
80 # [Leftovers]
81  
82  
83 [ "$PB_NAME/Leftovers" , _exp('Leftovers') , {} ],
84  
85 # [Region / postlude]
86 _region('Postlude'),
87 # [Authors]
88 [ "$PB_NAME/Authors" , _exp('Authors') , {} ],
89 # [Legal]
90 [ "$PB_NAME/Legal" , _exp('Legal') , {} ],
91 );
92 }
93  
94 sub _region {
95 my ($name) = @_;
96  
97 return [
98 "$PB_NAME/@{[ ucfirst $name ]}",
99 _exp('Region'),
100 { region_name => lc $name }
101 ];
102 }
103  
104 sub _generic {
105 my ($name) = @_;
106  
107 return [
108 "$PB_NAME/$name",
109 _exp('Generic'),
110 {
111 header => uc $name
112 }
113 ];
114 }
115 sub _collect {
116 my ($name, $command, $header) = @_;
117  
118 return [
119 "$PB_NAME/$name",
120 _exp('Collect'),
121 {
122 command => $command,
123 header => $header
124 }
125 ];
126 }
127  
128 1;
129  
130 __END__