line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
5
|
|
|
5
|
|
630736
|
use 5.006; |
|
5
|
|
|
|
|
14
|
|
2
|
5
|
|
|
5
|
|
23
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
112
|
|
3
|
5
|
|
|
5
|
|
21
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
389
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Dist::Zilla::PluginBundle::Author::KENTNL; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: BeLike::KENTNL when you build your distributions. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '2.025020'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
5
|
|
|
5
|
|
430
|
use Moose qw( with has ); |
|
5
|
|
|
|
|
276489
|
|
|
5
|
|
|
|
|
41
|
|
14
|
5
|
|
|
5
|
|
19701
|
use Moose::Util::TypeConstraints qw(enum); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
61
|
|
15
|
5
|
|
|
5
|
|
3649
|
use Dist::Zilla::Util::CurrentCmd qw( current_cmd ); |
|
5
|
|
|
|
|
43126
|
|
|
5
|
|
|
|
|
20
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PluginBundle'; |
18
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PluginBundle::PluginRemover'; |
19
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PluginBundle::Config::Slicer'; |
20
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::BundleDeps'; |
21
|
|
|
|
|
|
|
|
22
|
5
|
|
|
5
|
|
1246
|
use namespace::autoclean; |
|
5
|
|
|
|
|
5143
|
|
|
5
|
|
|
|
|
52
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub mvp_multivalue_args { return qw( auto_prereqs_skip copy_files ) } |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub mvp_aliases { |
52
|
|
|
|
|
|
|
return { |
53
|
4
|
|
|
4
|
0
|
488
|
'bumpversions' => 'bump_versions', |
54
|
|
|
|
|
|
|
'srcreadme' => 'src_readme', |
55
|
|
|
|
|
|
|
'copyfiles' => 'copy_files', |
56
|
|
|
|
|
|
|
}; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
has 'plugins' => ( 'is' => 'ro' =>, 'isa' => 'ArrayRef', 'init_arg' => undef, 'lazy' => 1, 'default' => sub { [] } ); |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
has 'normal_form' => ( 'is' => ro =>, 'isa' => 'Str', lazy => 1, default => sub { 'numify' } ); |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
has 'mantissa' => ( |
96
|
|
|
|
|
|
|
'is' => ro =>, |
97
|
|
|
|
|
|
|
'isa' => 'Int', |
98
|
|
|
|
|
|
|
'lazy' => 1, |
99
|
|
|
|
|
|
|
'default' => sub { |
100
|
|
|
|
|
|
|
return 6; |
101
|
|
|
|
|
|
|
}, |
102
|
|
|
|
|
|
|
); |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
has 'git_versions' => ( is => 'ro', isa => 'Any', lazy => 1, default => sub { undef } ); |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
has 'authority' => ( is => 'ro', isa => 'Str', lazy => 1, default => sub { 'cpan:KENTNL' }, ); |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
has 'auto_prereqs_skip' => ( |
143
|
|
|
|
|
|
|
is => 'ro', |
144
|
|
|
|
|
|
|
isa => 'ArrayRef', |
145
|
|
|
|
|
|
|
predicate => 'has_auto_prereqs_skip', |
146
|
|
|
|
|
|
|
lazy => 1, |
147
|
|
|
|
|
|
|
default => sub { [] }, |
148
|
|
|
|
|
|
|
); |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
has 'twitter_extra_hash_tags' => ( |
159
|
|
|
|
|
|
|
is => 'ro', |
160
|
|
|
|
|
|
|
'isa' => 'Str', |
161
|
|
|
|
|
|
|
lazy => 1, |
162
|
|
|
|
|
|
|
predicate => 'has_twitter_extra_hash_tags', |
163
|
|
|
|
|
|
|
default => sub { q[] }, |
164
|
|
|
|
|
|
|
); |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
has 'twitter_hash_tags' => ( |
175
|
|
|
|
|
|
|
is => 'ro', |
176
|
|
|
|
|
|
|
isa => 'Str', |
177
|
|
|
|
|
|
|
lazy => 1, |
178
|
|
|
|
|
|
|
default => sub { |
179
|
|
|
|
|
|
|
my ($self) = @_; |
180
|
|
|
|
|
|
|
return '#perl #cpan' unless $self->has_twitter_extra_hash_tags; |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
return '#perl #cpan ' . $self->twitter_extra_hash_tags; |
183
|
|
|
|
|
|
|
}, |
184
|
|
|
|
|
|
|
); |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
has 'tweet_url' => ( |
195
|
|
|
|
|
|
|
is => 'ro', |
196
|
|
|
|
|
|
|
isa => 'Str', |
197
|
|
|
|
|
|
|
lazy => 1, |
198
|
|
|
|
|
|
|
default => sub { |
199
|
|
|
|
|
|
|
## no critic (RequireInterpolationOfMetachars) |
200
|
|
|
|
|
|
|
return q[https://metacpan.org/release/{{$AUTHOR_UC}}/{{$DIST}}-{{$VERSION}}{{$TRIAL}}#whatsnew]; |
201
|
|
|
|
|
|
|
}, |
202
|
|
|
|
|
|
|
); |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
has 'toolkit_hardness' => ( |
225
|
|
|
|
|
|
|
is => ro =>, |
226
|
|
|
|
|
|
|
isa => enum( [ 'hard', 'soft' ] ), |
227
|
|
|
|
|
|
|
lazy => 1, |
228
|
|
|
|
|
|
|
default => sub { 'hard' }, |
229
|
|
|
|
|
|
|
); |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
has 'toolkit' => ( |
250
|
|
|
|
|
|
|
is => ro =>, |
251
|
|
|
|
|
|
|
isa => enum( [ 'mb', 'mbtiny', 'eumm' ] ), |
252
|
|
|
|
|
|
|
lazy => 1, |
253
|
|
|
|
|
|
|
default => sub { 'mb' }, |
254
|
|
|
|
|
|
|
); |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
has 'bump_versions' => ( |
266
|
|
|
|
|
|
|
is => ro =>, |
267
|
|
|
|
|
|
|
isa => 'Bool', |
268
|
|
|
|
|
|
|
lazy => 1, |
269
|
|
|
|
|
|
|
default => sub { undef }, |
270
|
|
|
|
|
|
|
); |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
has copy_files => ( |
288
|
|
|
|
|
|
|
is => ro =>, |
289
|
|
|
|
|
|
|
isa => 'ArrayRef[ Str ]', |
290
|
|
|
|
|
|
|
lazy => 1, |
291
|
|
|
|
|
|
|
default => sub { [ 'LICENSE', 'Makefile.PL' ] }, |
292
|
|
|
|
|
|
|
); |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
has src_readme => ( |
303
|
|
|
|
|
|
|
is => ro =>, |
304
|
|
|
|
|
|
|
isa => enum( [ 'pod', 'mkdn', 'none' ] ), |
305
|
|
|
|
|
|
|
lazy => 1, |
306
|
|
|
|
|
|
|
default => sub { return 'mkdn'; }, |
307
|
|
|
|
|
|
|
); |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
310
|
5
|
|
|
5
|
|
2013
|
no Moose; |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
20
|
|
311
|
5
|
|
|
5
|
|
365
|
no Moose::Util::TypeConstraints; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
32
|
|
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
sub add_plugin { |
320
|
172
|
|
|
172
|
1
|
164
|
my ( $self, $suffix, $conf ) = @_; |
321
|
172
|
50
|
|
|
|
226
|
if ( not defined $conf ) { |
322
|
0
|
|
|
|
|
0
|
$conf = {}; |
323
|
|
|
|
|
|
|
} |
324
|
172
|
50
|
33
|
|
|
382
|
if ( not ref $conf or not 'HASH' eq ref $conf ) { |
325
|
0
|
|
|
|
|
0
|
require Carp; |
326
|
0
|
|
|
|
|
0
|
Carp::croak('Conf must be a hash'); |
327
|
|
|
|
|
|
|
} |
328
|
|
|
|
|
|
|
## no critic (RequireInterpolationOfMetachars) |
329
|
172
|
|
|
|
|
111
|
push @{ $self->plugins }, [ q{@Author::KENTNL/} . $suffix, 'Dist::Zilla::Plugin::' . $suffix, $conf ]; |
|
172
|
|
|
|
|
5203
|
|
330
|
172
|
|
|
|
|
149
|
return; |
331
|
|
|
|
|
|
|
} |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
sub add_named_plugin { |
340
|
36
|
|
|
36
|
1
|
45
|
my ( $self, $name, $suffix, $conf ) = @_; |
341
|
36
|
50
|
|
|
|
58
|
if ( not defined $conf ) { |
342
|
0
|
|
|
|
|
0
|
$conf = {}; |
343
|
|
|
|
|
|
|
} |
344
|
36
|
50
|
33
|
|
|
101
|
if ( not ref $conf or not 'HASH' eq ref $conf ) { |
345
|
0
|
|
|
|
|
0
|
require Carp; |
346
|
0
|
|
|
|
|
0
|
Carp::croak('Conf must be a hash'); |
347
|
|
|
|
|
|
|
} |
348
|
|
|
|
|
|
|
## no critic (RequireInterpolationOfMetachars) |
349
|
36
|
|
|
|
|
29
|
push @{ $self->plugins }, [ q{@Author::KENTNL/} . $name, 'Dist::Zilla::Plugin::' . $suffix, $conf ]; |
|
36
|
|
|
|
|
1122
|
|
350
|
36
|
|
|
|
|
39
|
return; |
351
|
|
|
|
|
|
|
} |
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
|
359
|
16
|
|
33
|
16
|
|
37
|
sub _is_bake { return ( current_cmd() and 'bakeini' eq current_cmd() ) } |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
sub _configure_bump_versions_version { |
362
|
4
|
|
|
4
|
|
6
|
my ( $self, ) = @_; |
363
|
4
|
50
|
|
|
|
144
|
return if $self->bump_versions; |
364
|
0
|
|
|
|
|
0
|
$self->add_plugin( |
365
|
|
|
|
|
|
|
'Git::NextVersion::Sanitized' => { |
366
|
|
|
|
|
|
|
version_regexp => '^(.*)-source$', |
367
|
|
|
|
|
|
|
first_version => '0.001000', |
368
|
|
|
|
|
|
|
normal_form => $self->normal_form, |
369
|
|
|
|
|
|
|
mantissa => $self->mantissa, |
370
|
|
|
|
|
|
|
}, |
371
|
|
|
|
|
|
|
); |
372
|
0
|
|
|
|
|
0
|
return; |
373
|
|
|
|
|
|
|
} |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
sub _configure_basic_metadata { |
376
|
4
|
|
|
4
|
|
8
|
my ( $self, ) = @_; |
377
|
|
|
|
|
|
|
|
378
|
4
|
|
|
|
|
15
|
$self->add_plugin( 'MetaConfig' => {}, ); |
379
|
4
|
|
|
|
|
15
|
$self->add_plugin( 'GithubMeta' => { issues => 1 }, ); |
380
|
4
|
|
|
|
|
13
|
$self->add_plugin( 'MetaProvides::Package' => { ':version' => '1.14000001' }, ); |
381
|
|
|
|
|
|
|
|
382
|
4
|
|
|
|
|
14
|
my $builtwith_options = { |
383
|
|
|
|
|
|
|
':version' => '1.004000', |
384
|
|
|
|
|
|
|
show_config => 1, |
385
|
|
|
|
|
|
|
use_external_file => 'only', |
386
|
|
|
|
|
|
|
}; |
387
|
|
|
|
|
|
|
|
388
|
4
|
50
|
|
|
|
18
|
if ( 'linux' eq $^O ) { |
389
|
4
|
|
|
|
|
5
|
$builtwith_options->{show_uname} = 1; |
390
|
4
|
|
|
|
|
8
|
$builtwith_options->{uname_args} = q{-s -o -r -m -i}; |
391
|
|
|
|
|
|
|
} |
392
|
|
|
|
|
|
|
|
393
|
4
|
|
|
|
|
10
|
$self->add_plugin( 'MetaData::BuiltWith' => $builtwith_options ); |
394
|
4
|
|
|
|
|
18
|
$self->add_plugin( |
395
|
|
|
|
|
|
|
'Git::Contributors' => { |
396
|
|
|
|
|
|
|
':version' => '0.006', |
397
|
|
|
|
|
|
|
include_authors => 0, |
398
|
|
|
|
|
|
|
include_releaser => 0, |
399
|
|
|
|
|
|
|
order_by => 'name', |
400
|
|
|
|
|
|
|
}, |
401
|
|
|
|
|
|
|
); |
402
|
|
|
|
|
|
|
|
403
|
4
|
|
|
|
|
3
|
return; |
404
|
|
|
|
|
|
|
} |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
sub _none_match { |
407
|
4
|
|
|
4
|
|
6
|
my ( $item, @list ) = @_; |
408
|
4
|
|
|
|
|
12
|
for my $list_item (@list) { |
409
|
8
|
50
|
|
|
|
18
|
return if $item eq $list_item; |
410
|
|
|
|
|
|
|
} |
411
|
4
|
|
|
|
|
11
|
return 1; |
412
|
|
|
|
|
|
|
} |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
sub _configure_basic_files { |
415
|
4
|
|
|
4
|
|
7
|
my ($self) = @_; |
416
|
4
|
|
|
|
|
21
|
my (@ignore_files) = qw( README README.mkdn README.pod CONTRIBUTING.pod ); |
417
|
4
|
|
|
|
|
7
|
my (@copy_files) = (); |
418
|
|
|
|
|
|
|
|
419
|
4
|
50
|
|
|
|
6
|
if ( _none_match 'none', @{ $self->copy_files } ) { |
|
4
|
|
|
|
|
127
|
|
420
|
4
|
|
|
|
|
6
|
push @copy_files, @{ $self->copy_files }; |
|
4
|
|
|
|
|
128
|
|
421
|
|
|
|
|
|
|
} |
422
|
4
|
|
|
|
|
7
|
push @ignore_files, @copy_files; |
423
|
|
|
|
|
|
|
|
424
|
4
|
|
|
|
|
31
|
$self->add_plugin( |
425
|
|
|
|
|
|
|
'Git::GatherDir' => { |
426
|
|
|
|
|
|
|
include_dotfiles => 1, |
427
|
|
|
|
|
|
|
exclude_filename => [@ignore_files], |
428
|
|
|
|
|
|
|
}, |
429
|
|
|
|
|
|
|
); |
430
|
4
|
|
|
|
|
12
|
$self->add_plugin( 'License' => {} ); |
431
|
|
|
|
|
|
|
|
432
|
4
|
|
|
|
|
18
|
$self->add_plugin( 'MetaJSON' => {} ); |
433
|
4
|
|
|
|
|
9
|
$self->add_plugin( 'MetaYAML::Minimal' => {} ); |
434
|
4
|
|
|
|
|
10
|
$self->add_plugin( 'Manifest' => {} ); |
435
|
4
|
|
|
|
|
13
|
$self->add_plugin( 'Author::KENTNL::TravisCI' => { ':version' => '0.001002' } ); |
436
|
4
|
|
|
|
|
27
|
$self->add_plugin( |
437
|
|
|
|
|
|
|
'Author::KENTNL::CONTRIBUTING' => { |
438
|
|
|
|
|
|
|
':version' => '0.001003', |
439
|
|
|
|
|
|
|
document_version => '0.1', |
440
|
|
|
|
|
|
|
'-location' => 'root', # Assuming my patches get merged in future |
441
|
|
|
|
|
|
|
'-phase' => 'build', |
442
|
|
|
|
|
|
|
}, |
443
|
|
|
|
|
|
|
); |
444
|
|
|
|
|
|
|
|
445
|
4
|
50
|
|
|
|
11
|
if (@copy_files) { |
446
|
4
|
|
|
|
|
25
|
$self->add_named_plugin( 'CopyXBuild' => 'CopyFilesFromBuild', { copy => [@copy_files] } ); |
447
|
|
|
|
|
|
|
} |
448
|
|
|
|
|
|
|
|
449
|
4
|
|
|
|
|
7
|
return; |
450
|
|
|
|
|
|
|
} |
451
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
sub _configure_basic_tests { |
453
|
4
|
|
|
4
|
|
5
|
my ($self) = @_; |
454
|
4
|
|
|
|
|
14
|
$self->add_plugin( 'MetaTests' => {} ); |
455
|
4
|
|
|
|
|
10
|
$self->add_plugin( 'PodCoverageTests' => {} ); |
456
|
4
|
|
|
|
|
11
|
$self->add_plugin( 'PodSyntaxTests' => {} ); |
457
|
4
|
|
|
|
|
10
|
$self->add_plugin( 'Test::ReportPrereqs' => {} ); |
458
|
4
|
|
|
|
|
11
|
$self->add_plugin( 'Test::Kwalitee' => {} ); |
459
|
4
|
|
|
|
|
13
|
$self->add_plugin( 'Test::EOL' => { trailing_whitespace => 1, } ); |
460
|
4
|
|
|
|
|
8
|
$self->add_plugin( 'Test::MinimumVersion' => {} ); |
461
|
4
|
|
|
|
|
11
|
$self->add_plugin( 'Test::Compile::PerFile' => {} ); |
462
|
4
|
|
|
|
|
11
|
$self->add_plugin( 'Test::Perl::Critic' => {} ); |
463
|
4
|
|
|
|
|
4
|
return; |
464
|
|
|
|
|
|
|
} |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
sub _configure_pkgversion_munger { |
467
|
4
|
|
|
4
|
|
8
|
my ($self) = @_; |
468
|
4
|
50
|
|
|
|
124
|
if ( not $self->bump_versions ) { |
469
|
0
|
|
|
|
|
0
|
$self->add_plugin( 'PkgVersion' => {} ); |
470
|
0
|
|
|
|
|
0
|
return; |
471
|
|
|
|
|
|
|
} |
472
|
|
|
|
|
|
|
$self->add_plugin( |
473
|
4
|
|
|
|
|
130
|
'RewriteVersion::Sanitized' => { |
474
|
|
|
|
|
|
|
normal_form => $self->normal_form, |
475
|
|
|
|
|
|
|
mantissa => $self->mantissa, |
476
|
|
|
|
|
|
|
}, |
477
|
|
|
|
|
|
|
); |
478
|
4
|
|
|
|
|
4
|
return; |
479
|
|
|
|
|
|
|
} |
480
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
sub _configure_bundle_develop_suggests { |
482
|
4
|
|
|
4
|
|
6
|
my ($self) = @_; |
483
|
4
|
|
|
|
|
24
|
my $deps = { |
484
|
|
|
|
|
|
|
-phase => 'develop', |
485
|
|
|
|
|
|
|
-type => 'suggests', |
486
|
|
|
|
|
|
|
}; |
487
|
4
|
50
|
|
|
|
11
|
if ( _is_bake() ) { |
488
|
0
|
|
|
|
|
0
|
$deps->{'Dist::Zilla::PluginBundle::Author::KENTNL'} = $VERSION; |
489
|
0
|
|
|
|
|
0
|
$deps->{'Dist::Zilla::App::Command::bakeini'} = '0.001000'; |
490
|
|
|
|
|
|
|
} |
491
|
|
|
|
|
|
|
else { |
492
|
4
|
|
|
|
|
794
|
$deps->{'Dist::Zilla::PluginBundle::Author::KENTNL::Lite'} = '1.3.0'; |
493
|
|
|
|
|
|
|
} |
494
|
4
|
|
|
|
|
11
|
$self->add_named_plugin( 'BundleDevelSuggests' => 'Prereqs' => $deps ); |
495
|
4
|
|
|
|
|
5
|
return; |
496
|
|
|
|
|
|
|
} |
497
|
|
|
|
|
|
|
|
498
|
|
|
|
|
|
|
sub _configure_bundle_develop_requires { |
499
|
4
|
|
|
4
|
|
6
|
my ($self) = @_; |
500
|
4
|
50
|
|
|
|
9
|
return if _is_bake(); |
501
|
4
|
|
|
|
|
699
|
$self->add_named_plugin( |
502
|
|
|
|
|
|
|
'BundleDevelRequires' => 'Prereqs' => { |
503
|
|
|
|
|
|
|
-phase => 'develop', |
504
|
|
|
|
|
|
|
-type => 'requires', |
505
|
|
|
|
|
|
|
'Dist::Zilla::PluginBundle::Author::KENTNL' => $VERSION, |
506
|
|
|
|
|
|
|
}, |
507
|
|
|
|
|
|
|
); |
508
|
4
|
|
|
|
|
4
|
return; |
509
|
|
|
|
|
|
|
} |
510
|
|
|
|
|
|
|
|
511
|
|
|
|
|
|
|
sub _configure_toolkit { |
512
|
4
|
|
|
4
|
|
6
|
my ($self) = @_; |
513
|
4
|
|
|
|
|
129
|
my $tk = $self->toolkit; |
514
|
|
|
|
|
|
|
tc_select: { |
515
|
4
|
50
|
|
|
|
4
|
if ( 'mb' eq $tk ) { |
|
4
|
|
|
|
|
15
|
|
516
|
0
|
|
|
|
|
0
|
$self->add_plugin( 'ModuleBuild' => { default_jobs => 10 } ); |
517
|
0
|
|
|
|
|
0
|
last tc_select; |
518
|
|
|
|
|
|
|
} |
519
|
4
|
50
|
|
|
|
9
|
if ( 'eumm' eq $tk ) { |
520
|
4
|
|
|
|
|
15
|
$self->add_plugin( 'MakeMaker' => { default_jobs => 10 } ); |
521
|
4
|
|
|
|
|
8
|
last tc_select; |
522
|
|
|
|
|
|
|
} |
523
|
0
|
0
|
|
|
|
0
|
if ( 'mbtiny' eq $tk ) { |
524
|
0
|
|
|
|
|
0
|
$self->add_plugin( 'ModuleBuildTiny' => { default_jobs => 10 } ); |
525
|
0
|
|
|
|
|
0
|
last tc_select; |
526
|
|
|
|
|
|
|
} |
527
|
|
|
|
|
|
|
} |
528
|
4
|
|
|
|
|
16
|
$self->add_plugin( 'Author::KENTNL::RecommendFixes' => { ':version' => '0.004002' } ); |
529
|
4
|
|
|
|
|
4
|
return; |
530
|
|
|
|
|
|
|
} |
531
|
|
|
|
|
|
|
|
532
|
|
|
|
|
|
|
sub _configure_toolkit_prereqs { |
533
|
4
|
|
|
4
|
|
171
|
my ($self) = @_; |
534
|
|
|
|
|
|
|
|
535
|
4
|
|
|
|
|
14
|
my $extra_match_installed = { 'Test::More' => '0.99', }; |
536
|
|
|
|
|
|
|
|
537
|
4
|
50
|
|
|
|
135
|
$extra_match_installed->{'Module::Build'} = '0.4004' if 'mb' eq $self->toolkit; |
538
|
4
|
50
|
|
|
|
118
|
$extra_match_installed->{'Module::Build::Tiny'} = '0.032' if 'mbtiny' eq $self->toolkit; |
539
|
4
|
50
|
|
|
|
118
|
$extra_match_installed->{'ExtUtils::MakeMaker'} = '7.00' if 'eumm' eq $self->toolkit; |
540
|
|
|
|
|
|
|
|
541
|
4
|
50
|
|
|
|
128
|
if ( 'hard' eq $self->toolkit_hardness ) { |
542
|
|
|
|
|
|
|
$self->add_plugin( |
543
|
|
|
|
|
|
|
'Prereqs::MatchInstalled' => { |
544
|
0
|
|
|
|
|
0
|
modules => [ sort keys %{$extra_match_installed} ], |
|
0
|
|
|
|
|
0
|
|
545
|
|
|
|
|
|
|
}, |
546
|
|
|
|
|
|
|
); |
547
|
|
|
|
|
|
|
} |
548
|
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
$self->add_plugin( |
550
|
|
|
|
|
|
|
'Prereqs::Upgrade' => { |
551
|
4
|
|
|
|
|
9
|
%{$extra_match_installed}, |
|
4
|
|
|
|
|
50
|
|
552
|
|
|
|
|
|
|
'Moose' => '2.000', # Module::Runtime crap |
553
|
|
|
|
|
|
|
'Moo' => '1.000008', # lazy_build => sub |
554
|
|
|
|
|
|
|
'Path::Tiny' => '0.058', # ->sibling |
555
|
|
|
|
|
|
|
'File::ShareDir::Install' => '0.10', # dotfiles |
556
|
|
|
|
|
|
|
'Dist::Zilla' => '5', # encoding |
557
|
|
|
|
|
|
|
'Test::File::ShareDir' => '1.000000', # 5.8 version compat |
558
|
|
|
|
|
|
|
'Dist::Zila::Plugin::MetaProvides::Package' => '2.000000', # sane version |
559
|
|
|
|
|
|
|
}, |
560
|
|
|
|
|
|
|
); |
561
|
|
|
|
|
|
|
|
562
|
4
|
|
|
|
|
12
|
my $applymap = [ 'develop.requires = develop.requires', ]; |
563
|
|
|
|
|
|
|
|
564
|
4
|
50
|
|
|
|
9
|
$applymap = [ 'develop.suggests = develop.suggests', ] if _is_bake(); |
565
|
|
|
|
|
|
|
|
566
|
4
|
|
|
|
|
626
|
my @bundles = ('Dist::Zilla::PluginBundle::Author::KENTNL'); |
567
|
|
|
|
|
|
|
|
568
|
4
|
50
|
|
|
|
8
|
push @bundles, 'Dist::Zilla::App::Command::bakeini' if _is_bake(); |
569
|
|
|
|
|
|
|
|
570
|
4
|
|
|
|
|
563
|
$self->add_named_plugin( |
571
|
|
|
|
|
|
|
'always_latest_develop_bundle' => 'Prereqs::Recommend::MatchInstalled' => { |
572
|
|
|
|
|
|
|
applyto_map => $applymap, |
573
|
|
|
|
|
|
|
applyto_phase => [ 'develop', ], |
574
|
|
|
|
|
|
|
modules => [@bundles], |
575
|
|
|
|
|
|
|
}, |
576
|
|
|
|
|
|
|
); |
577
|
4
|
|
|
|
|
11
|
$self->add_plugin( 'RemovePrereqs::Provided' => {} ); |
578
|
4
|
|
|
|
|
8
|
return; |
579
|
|
|
|
|
|
|
} |
580
|
|
|
|
|
|
|
|
581
|
|
|
|
|
|
|
sub _configure_readmes { |
582
|
4
|
|
|
4
|
|
6
|
my ($self) = @_; |
583
|
|
|
|
|
|
|
|
584
|
4
|
|
|
|
|
9
|
$self->add_named_plugin( 'ShippedReadme' => 'Readme::Brief' => {}, ); |
585
|
|
|
|
|
|
|
|
586
|
4
|
|
|
|
|
126
|
my $type = $self->src_readme; |
587
|
|
|
|
|
|
|
|
588
|
4
|
50
|
|
|
|
12
|
return if 'none' eq $type; |
589
|
|
|
|
|
|
|
|
590
|
4
|
|
|
|
|
5
|
my $map = {}; |
591
|
4
|
|
|
|
|
24
|
$map->{mkdn} = { type => 'markdown', filename => 'README.mkdn' }; |
592
|
4
|
|
|
|
|
11
|
$map->{pod} = { type => 'pod', filename => 'README.pod' }; |
593
|
|
|
|
|
|
|
|
594
|
4
|
50
|
|
|
|
14
|
if ( not exists $map->{$type} ) { |
595
|
0
|
|
|
|
|
0
|
require Carp; |
596
|
0
|
|
|
|
|
0
|
return Carp::confess("No known readme type $type"); |
597
|
|
|
|
|
|
|
} |
598
|
|
|
|
|
|
|
|
599
|
4
|
|
|
|
|
10
|
$self->add_plugin( 'ReadmeAnyFromPod' => { location => 'root', %{ $map->{$type} } }, ); |
|
4
|
|
|
|
|
22
|
|
600
|
|
|
|
|
|
|
|
601
|
4
|
|
|
|
|
10
|
return; |
602
|
|
|
|
|
|
|
} |
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
sub configure { |
605
|
4
|
|
|
4
|
1
|
7
|
my ($self) = @_; |
606
|
|
|
|
|
|
|
|
607
|
|
|
|
|
|
|
# Version |
608
|
4
|
|
|
|
|
11
|
$self->_configure_bump_versions_version; |
609
|
|
|
|
|
|
|
|
610
|
|
|
|
|
|
|
# MetaData |
611
|
4
|
|
|
|
|
11
|
$self->_configure_basic_metadata; |
612
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
# Gather Files |
614
|
4
|
|
|
|
|
13
|
$self->_configure_basic_files; |
615
|
4
|
|
|
|
|
11
|
$self->_configure_basic_tests; |
616
|
|
|
|
|
|
|
|
617
|
|
|
|
|
|
|
# Prune files |
618
|
|
|
|
|
|
|
|
619
|
4
|
|
|
|
|
8
|
$self->add_plugin( 'ManifestSkip' => {} ); |
620
|
|
|
|
|
|
|
|
621
|
|
|
|
|
|
|
# Mungers |
622
|
4
|
|
|
|
|
11
|
$self->_configure_pkgversion_munger; |
623
|
4
|
|
|
|
|
14
|
$self->add_plugin( |
624
|
|
|
|
|
|
|
'PodWeaver' => { |
625
|
|
|
|
|
|
|
replacer => 'replace_with_blank', |
626
|
|
|
|
|
|
|
}, |
627
|
|
|
|
|
|
|
); |
628
|
|
|
|
|
|
|
|
629
|
|
|
|
|
|
|
# Prereqs |
630
|
|
|
|
|
|
|
|
631
|
|
|
|
|
|
|
{ |
632
|
4
|
|
|
|
|
4
|
my $autoprereqs_hash = {}; |
|
4
|
|
|
|
|
8
|
|
633
|
4
|
50
|
|
|
|
150
|
$autoprereqs_hash->{skips} = $self->auto_prereqs_skip if $self->has_auto_prereqs_skip; |
634
|
4
|
|
|
|
|
27
|
$self->add_plugin( 'AutoPrereqs' => $autoprereqs_hash ); |
635
|
|
|
|
|
|
|
} |
636
|
|
|
|
|
|
|
|
637
|
4
|
|
|
|
|
15
|
$self->_configure_bundle_develop_suggests(); |
638
|
4
|
|
|
|
|
12
|
$self->_configure_bundle_develop_requires(); |
639
|
|
|
|
|
|
|
|
640
|
4
|
|
|
|
|
11
|
$self->add_plugin( 'Prereqs::AuthorDeps' => {} ); |
641
|
|
|
|
|
|
|
|
642
|
4
|
|
|
|
|
12
|
$self->add_plugin( 'MinimumPerl' => {} ); |
643
|
4
|
|
|
|
|
128
|
$self->add_plugin( |
644
|
|
|
|
|
|
|
'Authority' => { |
645
|
|
|
|
|
|
|
':version' => '1.006', |
646
|
|
|
|
|
|
|
authority => $self->authority, |
647
|
|
|
|
|
|
|
do_metadata => 1, |
648
|
|
|
|
|
|
|
locate_comment => 1, |
649
|
|
|
|
|
|
|
}, |
650
|
|
|
|
|
|
|
); |
651
|
|
|
|
|
|
|
|
652
|
4
|
|
|
|
|
13
|
$self->_configure_toolkit; |
653
|
|
|
|
|
|
|
|
654
|
4
|
|
|
|
|
15
|
$self->_configure_readmes; |
655
|
|
|
|
|
|
|
|
656
|
4
|
|
|
|
|
11
|
$self->add_plugin( 'Test::CPAN::Changes' => {} ); |
657
|
4
|
|
|
|
|
26
|
$self->add_plugin( 'RunExtraTests' => { default_jobs => 10 } ); |
658
|
4
|
|
|
|
|
13
|
$self->add_plugin( 'TestRelease' => {} ); |
659
|
4
|
|
|
|
|
9
|
$self->add_plugin( 'ConfirmRelease' => {} ); |
660
|
|
|
|
|
|
|
|
661
|
4
|
|
|
|
|
14
|
$self->add_plugin( 'Git::Check' => { filename => 'Changes' } ); |
662
|
4
|
|
|
|
|
13
|
$self->add_named_plugin( 'commit_dirty_files' => 'Git::Commit' => {} ); |
663
|
4
|
|
|
|
|
15
|
$self->add_named_plugin( 'tag_master', => 'Git::Tag' => { tag_format => '%v-source' } ); |
664
|
4
|
|
|
|
|
29
|
$self->add_plugin( |
665
|
|
|
|
|
|
|
'Git::NextRelease' => { |
666
|
|
|
|
|
|
|
':version' => '0.004000', |
667
|
|
|
|
|
|
|
time_zone => 'UTC', |
668
|
|
|
|
|
|
|
format => q[%v %{yyyy-MM-dd'T'HH:mm:ss}dZ %h], |
669
|
|
|
|
|
|
|
default_branch => 'master', |
670
|
|
|
|
|
|
|
}, |
671
|
|
|
|
|
|
|
); |
672
|
|
|
|
|
|
|
|
673
|
4
|
50
|
|
|
|
125
|
if ( $self->bump_versions ) { |
674
|
4
|
|
|
|
|
10
|
$self->add_plugin( 'BumpVersionAfterRelease' => {} ); |
675
|
|
|
|
|
|
|
} |
676
|
|
|
|
|
|
|
$self->add_named_plugin( |
677
|
4
|
|
|
|
|
15
|
'commit_release_changes' => 'Git::Commit' => { |
678
|
|
|
|
|
|
|
allow_dirty_match => '^lib/', |
679
|
|
|
|
|
|
|
}, |
680
|
|
|
|
|
|
|
); |
681
|
|
|
|
|
|
|
|
682
|
4
|
|
|
|
|
25
|
$self->add_plugin( 'Git::CommitBuild' => { branch => 'builds', release_branch => 'releases' } ); |
683
|
4
|
|
|
|
|
13
|
$self->add_named_plugin( 'tag_release', 'Git::Tag' => { branch => 'releases', tag_format => '%v' } ); |
684
|
4
|
|
|
|
|
9
|
$self->add_plugin( 'UploadToCPAN' => {} ); |
685
|
4
|
|
|
|
|
132
|
$self->add_plugin( |
686
|
|
|
|
|
|
|
'Twitter' => { |
687
|
|
|
|
|
|
|
hash_tags => $self->twitter_hash_tags, |
688
|
|
|
|
|
|
|
tweet_url => $self->tweet_url, |
689
|
|
|
|
|
|
|
url_shortener => 'none', |
690
|
|
|
|
|
|
|
}, |
691
|
|
|
|
|
|
|
); |
692
|
|
|
|
|
|
|
|
693
|
4
|
|
|
|
|
12
|
$self->_configure_toolkit_prereqs; |
694
|
|
|
|
|
|
|
|
695
|
4
|
|
|
|
|
4
|
return; |
696
|
|
|
|
|
|
|
} |
697
|
|
|
|
|
|
|
|
698
|
|
|
|
|
|
|
sub BUILDARGS { |
699
|
4
|
|
|
4
|
1
|
9
|
my ( $self, $config, @args ) = @_; |
700
|
|
|
|
|
|
|
|
701
|
4
|
50
|
50
|
|
|
30
|
if ( @args or not 'HASH' eq ( ref $config || q[] ) ) { |
|
|
|
33
|
|
|
|
|
702
|
0
|
|
|
|
|
0
|
$config = { $config, @args }; |
703
|
|
|
|
|
|
|
} |
704
|
4
|
|
|
|
|
8
|
my (%init_args); |
705
|
4
|
|
|
|
|
16
|
for my $attr ( $self->meta->get_all_attributes ) { |
706
|
56
|
100
|
|
|
|
401
|
next unless my $arg = $attr->init_arg; |
707
|
52
|
|
|
|
|
56
|
$init_args{$arg} = 1; |
708
|
|
|
|
|
|
|
} |
709
|
|
|
|
|
|
|
|
710
|
|
|
|
|
|
|
# A weakened warn-only filter-supporting StrictConstructor |
711
|
4
|
|
|
|
|
10
|
for my $key ( keys %{$config} ) { |
|
4
|
|
|
|
|
13
|
|
712
|
28
|
50
|
|
|
|
47
|
next if exists $init_args{$key}; |
713
|
0
|
0
|
|
|
|
0
|
next if $key =~ /\A-remove/msx; |
714
|
0
|
0
|
|
|
|
0
|
next if $key =~ /\A[^.]+[.][^.]/msx; |
715
|
0
|
|
|
|
|
0
|
require Carp; |
716
|
0
|
|
|
|
|
0
|
Carp::carp("Unknown key $key"); |
717
|
|
|
|
|
|
|
} |
718
|
4
|
|
|
|
|
147
|
return $config; |
719
|
|
|
|
|
|
|
} |
720
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
sub bundle_config { |
722
|
|
|
|
|
|
|
my ( $self, $section ) = @_; |
723
|
|
|
|
|
|
|
my $class = ( ref $self ) || $self; |
724
|
|
|
|
|
|
|
|
725
|
|
|
|
|
|
|
my $wanted_version; |
726
|
|
|
|
|
|
|
if ( exists $section->{payload}->{':version'} ) { |
727
|
|
|
|
|
|
|
$wanted_version = delete $section->{payload}->{':version'}; |
728
|
|
|
|
|
|
|
} |
729
|
|
|
|
|
|
|
my $instance = $class->new( $section->{payload} ); |
730
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
$instance->configure(); |
732
|
|
|
|
|
|
|
|
733
|
|
|
|
|
|
|
return @{ $instance->plugins }; |
734
|
|
|
|
|
|
|
} |
735
|
|
|
|
|
|
|
|
736
|
|
|
|
|
|
|
1; |
737
|
|
|
|
|
|
|
|
738
|
|
|
|
|
|
|
__END__ |
739
|
|
|
|
|
|
|
|
740
|
|
|
|
|
|
|
=pod |
741
|
|
|
|
|
|
|
|
742
|
|
|
|
|
|
|
=encoding UTF-8 |
743
|
|
|
|
|
|
|
|
744
|
|
|
|
|
|
|
=head1 NAME |
745
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
Dist::Zilla::PluginBundle::Author::KENTNL - BeLike::KENTNL when you build your distributions. |
747
|
|
|
|
|
|
|
|
748
|
|
|
|
|
|
|
=head1 VERSION |
749
|
|
|
|
|
|
|
|
750
|
|
|
|
|
|
|
version 2.025020 |
751
|
|
|
|
|
|
|
|
752
|
|
|
|
|
|
|
=head1 SYNOPSIS |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
[@Author::KENTNL] |
755
|
|
|
|
|
|
|
normal_form = numify ; Mandatory for this bundle indicating normal form. |
756
|
|
|
|
|
|
|
; see DZP::Git::NextVersion::Sanitized |
757
|
|
|
|
|
|
|
|
758
|
|
|
|
|
|
|
mantissa = 6 ; Mandatory for this bundle if normal_form is numify. |
759
|
|
|
|
|
|
|
; see DZP::Git::NextVersion::Sanitized |
760
|
|
|
|
|
|
|
|
761
|
|
|
|
|
|
|
authority = cpan:KENTNL ; Optional, defaults to cpan:KENTNL |
762
|
|
|
|
|
|
|
|
763
|
|
|
|
|
|
|
auto_prereqs_skip = Some::Module ; Hide these from autoprereqs |
764
|
|
|
|
|
|
|
auto_prereqs_skip = Other::Module |
765
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
toolkit = mb ; Which toolkit to use. Either eumm or mb |
767
|
|
|
|
|
|
|
; mb is default. |
768
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
toolkit_hardness = hard ; Whether to upgrade *require* deps to the latest |
770
|
|
|
|
|
|
|
; or wether to make them merely recomendations. |
771
|
|
|
|
|
|
|
; Either 'soft' ( recommend ) or 'hard' ( require ) |
772
|
|
|
|
|
|
|
; default is 'hard' |
773
|
|
|
|
|
|
|
|
774
|
|
|
|
|
|
|
twitter_extra_hash_tags = #foo #bar ; non-default hashtags to append to the tweet |
775
|
|
|
|
|
|
|
|
776
|
|
|
|
|
|
|
=head1 DESCRIPTION |
777
|
|
|
|
|
|
|
|
778
|
|
|
|
|
|
|
This is the plug-in bundle that KENTNL uses. It exists mostly because he is very lazy |
779
|
|
|
|
|
|
|
and wants others to be using what he's using if they want to be doing work on his modules. |
780
|
|
|
|
|
|
|
|
781
|
|
|
|
|
|
|
=head1 NAMING SCHEME |
782
|
|
|
|
|
|
|
|
783
|
|
|
|
|
|
|
As I blogged about on L<< C<blog.fox.geek.nz> : Making a Minting Profile as a CPANized Dist |http://bit.ly/hAwl4S >>, |
784
|
|
|
|
|
|
|
this bundle advocates a new naming system for people who are absolutely convinced they want their C<Author-Centric> distribution |
785
|
|
|
|
|
|
|
uploaded to CPAN. |
786
|
|
|
|
|
|
|
|
787
|
|
|
|
|
|
|
As we have seen with Dist::Zilla there have been a slew of PluginBundles with CPANID's in their name, to the point that there is |
788
|
|
|
|
|
|
|
a copious amount of name-space pollution in the PluginBundle name-space, and more Author bundles than task-bundles, which was |
789
|
|
|
|
|
|
|
really what the name-space was designed for, and I'm petitioning you to help reduce this annoyance in future modules. |
790
|
|
|
|
|
|
|
|
791
|
|
|
|
|
|
|
From a CPAN testers perspective, the annoyance of lots of CPANID-dists is similar to the annoyance of the whole DPCHRIST:: |
792
|
|
|
|
|
|
|
subspace, and that if this pattern continues, it will mean for the testers who do not wish to test everyones personal modules, |
793
|
|
|
|
|
|
|
that they will have to work hard to avoid this. If DPCHRIST:: had used something like Author::DPCHRIST:: instead, I doubt so many |
794
|
|
|
|
|
|
|
people would be horrified by it, because you can just have a policy/rule that excludes ^Author::, and everyone else who goes that |
795
|
|
|
|
|
|
|
way can be quietly ignored. |
796
|
|
|
|
|
|
|
|
797
|
|
|
|
|
|
|
Then we could probably rationally add that same restriction to the irc announce bots, the "recent modules" list and so-forth, and |
798
|
|
|
|
|
|
|
possibly even apply special indexing restrictions or something so people wouldn't even have to know those modules exist on cpan! |
799
|
|
|
|
|
|
|
|
800
|
|
|
|
|
|
|
So, for the sake of cleanliness, semantics, and general global sanity, I ask you to join me with my Author:: naming policy to |
801
|
|
|
|
|
|
|
voluntarily segregate modules that are most likely of only personal use from those that have more general application. |
802
|
|
|
|
|
|
|
|
803
|
|
|
|
|
|
|
Dist::Zilla::Plugin::Foo # [Foo] dist-zilla plugins for general use |
804
|
|
|
|
|
|
|
Dist::Zilla::Plugin::Author::KENTNL::Foo # [Author::KENTNL::Foo] foo that only KENTNL will probably have use for |
805
|
|
|
|
|
|
|
Dist::Zilla::PluginBundle::Classic # [@Classic] A bundle that can have practical use by many |
806
|
|
|
|
|
|
|
Dist::Zilla::PluginBundle::Author::KENTNL # [@Author::KENTNL] KENTNL's primary plugin bundle |
807
|
|
|
|
|
|
|
Dist::Zilla::MintingProfile::Default # A minting profile that is used by all |
808
|
|
|
|
|
|
|
Dist::Zilla::MintingProfile::Author::KENTNL # A minting profile that only KENTNL will find of use. |
809
|
|
|
|
|
|
|
|
810
|
|
|
|
|
|
|
=head2 Current Proponents |
811
|
|
|
|
|
|
|
|
812
|
|
|
|
|
|
|
I wish to give proper respect to the people out there already implementing this scheme: |
813
|
|
|
|
|
|
|
|
814
|
|
|
|
|
|
|
=over 4 |
815
|
|
|
|
|
|
|
|
816
|
|
|
|
|
|
|
=item L<< C<@Author::DOHERTY> |Dist::Zilla::PluginBundle::Author::DOHERTY >> - Mike Doherty's, Author Bundle. |
817
|
|
|
|
|
|
|
|
818
|
|
|
|
|
|
|
=item L<< C<@Author::OLIVER> |Dist::Zilla::PluginBundle::Author::OLIVER >> - Oliver Gorwits', Author Bundle. |
819
|
|
|
|
|
|
|
|
820
|
|
|
|
|
|
|
=item L<< C<Dist::Zilla::PluginBundle::Author::> namespace |http://bit.ly/dIovQI >> - Oliver Gorwit's blog on the subject. |
821
|
|
|
|
|
|
|
|
822
|
|
|
|
|
|
|
=item L<< C<@Author::LESPEA> |Dist::Zilla::PluginBundle::Author::LESPEA >> - Adam Lesperance's, Author Bundle. |
823
|
|
|
|
|
|
|
|
824
|
|
|
|
|
|
|
=item L<< C<@Author::ALEXBIO> |Dist::Zilla::PluginBundle::Author::ALEXBIO >> - Alessandro Ghedini's, Author Bundle. |
825
|
|
|
|
|
|
|
|
826
|
|
|
|
|
|
|
=item L<< C<@Author::RWSTAUNER> |Dist::Zilla::PluginBundle::Author::RWSTAUNER >> - Randy Stauner's, Author Bundle. |
827
|
|
|
|
|
|
|
|
828
|
|
|
|
|
|
|
=item L<< C<@Author::WOLVERIAN> |Dist::Zilla::PluginBundle::Author::WOLVERIAN >> - Ilmari Vacklin's, Author Bundle. |
829
|
|
|
|
|
|
|
|
830
|
|
|
|
|
|
|
=item L<< C<@Author::YANICK> |Dist::Zilla::PluginBundle::Author::YANICK >> - Yanick Champoux's, Author Bundle. |
831
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
=item L<< C<@Author::RUSSOZ> |Dist::Zilla::PluginBundle::Author::RUSSOZ >> - Alexei Znamensky's, Author Bundle. |
833
|
|
|
|
|
|
|
|
834
|
|
|
|
|
|
|
=back |
835
|
|
|
|
|
|
|
|
836
|
|
|
|
|
|
|
=head1 METHODS |
837
|
|
|
|
|
|
|
|
838
|
|
|
|
|
|
|
=head2 C<bundle_config> |
839
|
|
|
|
|
|
|
|
840
|
|
|
|
|
|
|
See L<< the C<PluginBundle> role|Dist::Zilla::Role::PluginBundle >> for what this is for, it is a method to satisfy that role. |
841
|
|
|
|
|
|
|
|
842
|
|
|
|
|
|
|
=head2 C<add_plugin> |
843
|
|
|
|
|
|
|
|
844
|
|
|
|
|
|
|
$bundle_object->add_plugin("Basename" => { config_hash } ); |
845
|
|
|
|
|
|
|
|
846
|
|
|
|
|
|
|
=head2 C<add_named_plugin> |
847
|
|
|
|
|
|
|
|
848
|
|
|
|
|
|
|
$bundle_object->add_named_plugin("alias" => "Basename" => { config_hash } ); |
849
|
|
|
|
|
|
|
|
850
|
|
|
|
|
|
|
=head2 C<configure> |
851
|
|
|
|
|
|
|
|
852
|
|
|
|
|
|
|
Called by in C<bundle_config> after C<new> |
853
|
|
|
|
|
|
|
|
854
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
855
|
|
|
|
|
|
|
|
856
|
|
|
|
|
|
|
=head2 C<plugins> |
857
|
|
|
|
|
|
|
|
858
|
|
|
|
|
|
|
B<INTERNAL>. |
859
|
|
|
|
|
|
|
|
860
|
|
|
|
|
|
|
ArrayRef, ro, default = [], no init arg. |
861
|
|
|
|
|
|
|
|
862
|
|
|
|
|
|
|
Populated during C<< $self->configure >> and returned from C<< ->bundle_config >> |
863
|
|
|
|
|
|
|
|
864
|
|
|
|
|
|
|
=head2 C<normal_form> |
865
|
|
|
|
|
|
|
|
866
|
|
|
|
|
|
|
Str, ro, lazy |
867
|
|
|
|
|
|
|
|
868
|
|
|
|
|
|
|
A C<normal_form> to pass to L<< C<[Git::NextVersion::Sanitized]>|Dist::Zilla::Plugin::Git::NextVersion::Sanitized >>. |
869
|
|
|
|
|
|
|
|
870
|
|
|
|
|
|
|
Defaults to C<numify> |
871
|
|
|
|
|
|
|
|
872
|
|
|
|
|
|
|
See L<< C<[::Role::Version::Sanitize]>|Dist::Zilla::Role::Version::Sanitize >> |
873
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
=head2 C<mantissa> |
875
|
|
|
|
|
|
|
|
876
|
|
|
|
|
|
|
Int, ro, defaults to 6. |
877
|
|
|
|
|
|
|
|
878
|
|
|
|
|
|
|
Defines the length of the mantissa when normal form is C<numify>. |
879
|
|
|
|
|
|
|
|
880
|
|
|
|
|
|
|
See L<< C<[Git::NextVersion::Sanitized]>|Dist::Zilla::Plugin::Git::NextVersion::Sanitized >> and L<< C<[::Role::Version::Sanitize]>|Dist::Zilla::Role::Version::Sanitize >> |
881
|
|
|
|
|
|
|
|
882
|
|
|
|
|
|
|
=head2 C<git_versions> |
883
|
|
|
|
|
|
|
|
884
|
|
|
|
|
|
|
Any, unused. |
885
|
|
|
|
|
|
|
|
886
|
|
|
|
|
|
|
=over 4 |
887
|
|
|
|
|
|
|
|
888
|
|
|
|
|
|
|
=item * B<UNUSED> |
889
|
|
|
|
|
|
|
|
890
|
|
|
|
|
|
|
=back |
891
|
|
|
|
|
|
|
|
892
|
|
|
|
|
|
|
Since C<2.020>, this field is no longer required, and is unused, simply supported for legacy reasons. |
893
|
|
|
|
|
|
|
|
894
|
|
|
|
|
|
|
Things may not work if code has not been portaged to be C<Git::NextVersion> safe, but that's better than going "bang". |
895
|
|
|
|
|
|
|
|
896
|
|
|
|
|
|
|
But code will be assumed to be using C<Git::NextVersion>. |
897
|
|
|
|
|
|
|
|
898
|
|
|
|
|
|
|
=head2 C<authority> |
899
|
|
|
|
|
|
|
|
900
|
|
|
|
|
|
|
Str, ro, default = cpan:KENTNL |
901
|
|
|
|
|
|
|
|
902
|
|
|
|
|
|
|
An authority string to use for C<< [Authority] >>. |
903
|
|
|
|
|
|
|
|
904
|
|
|
|
|
|
|
=head2 C<auto_prereqs_skip> |
905
|
|
|
|
|
|
|
|
906
|
|
|
|
|
|
|
ArrayRef, ro, multivalue, default = [] |
907
|
|
|
|
|
|
|
|
908
|
|
|
|
|
|
|
A list of prerequisites to pass to C<< [AutoPrereqs].skips >> |
909
|
|
|
|
|
|
|
|
910
|
|
|
|
|
|
|
=head2 C<twitter_extra_hash_tags> |
911
|
|
|
|
|
|
|
|
912
|
|
|
|
|
|
|
Str, ro, default = "" |
913
|
|
|
|
|
|
|
|
914
|
|
|
|
|
|
|
Additional hash tags to append to twitter |
915
|
|
|
|
|
|
|
|
916
|
|
|
|
|
|
|
=head2 C<twitter_hash_tags> |
917
|
|
|
|
|
|
|
|
918
|
|
|
|
|
|
|
Str, ro, default = '#perl #cpan' . extras() |
919
|
|
|
|
|
|
|
|
920
|
|
|
|
|
|
|
Populates C<extras> from C<twitter_extra_hash_tags> |
921
|
|
|
|
|
|
|
|
922
|
|
|
|
|
|
|
=head2 C<tweet_url> |
923
|
|
|
|
|
|
|
|
924
|
|
|
|
|
|
|
Str, ro, default = q[https://metacpan.org/release/{{$AUTHOR_UC}}/{{$DIST}}-{{$VERSION}}{{$TRIAL}}#whatsnew] |
925
|
|
|
|
|
|
|
|
926
|
|
|
|
|
|
|
The C<URI> to tweet to C<@kentnlrelease> |
927
|
|
|
|
|
|
|
|
928
|
|
|
|
|
|
|
=head2 C<toolkit_hardness> |
929
|
|
|
|
|
|
|
|
930
|
|
|
|
|
|
|
enum( hard, soft ), ro, default = hard |
931
|
|
|
|
|
|
|
|
932
|
|
|
|
|
|
|
=over 4 |
933
|
|
|
|
|
|
|
|
934
|
|
|
|
|
|
|
=item * C<hard> |
935
|
|
|
|
|
|
|
|
936
|
|
|
|
|
|
|
Copy the versions of important toolkit components the author was using as C<required> dependencies, |
937
|
|
|
|
|
|
|
forcing consumers to update aggressively on those parts. |
938
|
|
|
|
|
|
|
|
939
|
|
|
|
|
|
|
=item * C<soft> |
940
|
|
|
|
|
|
|
|
941
|
|
|
|
|
|
|
Copy the versions of important toolkit components the author was using as C<recommended> dependencies, |
942
|
|
|
|
|
|
|
so that only consumers who are installing with C<--with-recommended> get given the forced upgrade path. |
943
|
|
|
|
|
|
|
|
944
|
|
|
|
|
|
|
=back |
945
|
|
|
|
|
|
|
|
946
|
|
|
|
|
|
|
=head2 C<toolkit> |
947
|
|
|
|
|
|
|
|
948
|
|
|
|
|
|
|
enum( mb, mbtiny, eumm ), ro, default = mb |
949
|
|
|
|
|
|
|
|
950
|
|
|
|
|
|
|
Determines which tooling to generate the distribution with |
951
|
|
|
|
|
|
|
|
952
|
|
|
|
|
|
|
=over 4 |
953
|
|
|
|
|
|
|
|
954
|
|
|
|
|
|
|
=item * C<mb> : L<< C<Module::Build>|Module::Build >> |
955
|
|
|
|
|
|
|
|
956
|
|
|
|
|
|
|
=item * C<mbtiny> : L<< C<Module::Build::Tiny>|Module::Build::Tiny >> |
957
|
|
|
|
|
|
|
|
958
|
|
|
|
|
|
|
=item * C<eumm> : L<< C<ExtUtils::MakeMaker>|ExtUtils::MakeMaker >> |
959
|
|
|
|
|
|
|
|
960
|
|
|
|
|
|
|
=back |
961
|
|
|
|
|
|
|
|
962
|
|
|
|
|
|
|
=head2 C<bump_versions> |
963
|
|
|
|
|
|
|
|
964
|
|
|
|
|
|
|
bump_versions = 1 |
965
|
|
|
|
|
|
|
|
966
|
|
|
|
|
|
|
If true, use C<[BumpVersionAfterRelease]> and C<[RewriteVersions::Sanitized]> instead of C<[PkgVersion]> and |
967
|
|
|
|
|
|
|
C<[Git::NextVersion::Sanitized]> |
968
|
|
|
|
|
|
|
|
969
|
|
|
|
|
|
|
=head2 C<copy_files> |
970
|
|
|
|
|
|
|
|
971
|
|
|
|
|
|
|
An array of files generated by C<Dist::Zilla> build to copy from the built dist back to the source dist |
972
|
|
|
|
|
|
|
|
973
|
|
|
|
|
|
|
If not specified, the default contents are as follows: |
974
|
|
|
|
|
|
|
|
975
|
|
|
|
|
|
|
copy_files = LICENSE |
976
|
|
|
|
|
|
|
copy_files = Makefile.PL |
977
|
|
|
|
|
|
|
|
978
|
|
|
|
|
|
|
These defaults can be wiped with: |
979
|
|
|
|
|
|
|
|
980
|
|
|
|
|
|
|
copy_files = none |
981
|
|
|
|
|
|
|
|
982
|
|
|
|
|
|
|
=head2 C<src_readme> |
983
|
|
|
|
|
|
|
|
984
|
|
|
|
|
|
|
src_readme = pod ; # generate README.pod on the source side |
985
|
|
|
|
|
|
|
src_readme = mkdn ; # generate README.mkdn on the source side |
986
|
|
|
|
|
|
|
src_readme = none ; # don't generate README on the source side |
987
|
|
|
|
|
|
|
|
988
|
|
|
|
|
|
|
=begin MetaPOD::JSON v1.1.0 |
989
|
|
|
|
|
|
|
|
990
|
|
|
|
|
|
|
{ |
991
|
|
|
|
|
|
|
"namespace":"Dist::Zilla::PluginBundle::Author::KENTNL", |
992
|
|
|
|
|
|
|
"interface":"class", |
993
|
|
|
|
|
|
|
"inherits":"Moose::Object", |
994
|
|
|
|
|
|
|
"does":"Dist::Zilla::Role::PluginBundle" |
995
|
|
|
|
|
|
|
} |
996
|
|
|
|
|
|
|
|
997
|
|
|
|
|
|
|
|
998
|
|
|
|
|
|
|
=end MetaPOD::JSON |
999
|
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
=for Pod::Coverage mvp_multivalue_args |
1001
|
|
|
|
|
|
|
mvp_aliases |
1002
|
|
|
|
|
|
|
bundle_config_inner |
1003
|
|
|
|
|
|
|
|
1004
|
|
|
|
|
|
|
=head1 AUTHOR |
1005
|
|
|
|
|
|
|
|
1006
|
|
|
|
|
|
|
Kent Fredric <kentnl@cpan.org> |
1007
|
|
|
|
|
|
|
|
1008
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
1009
|
|
|
|
|
|
|
|
1010
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Kent Fredric <kentfredric@gmail.com>. |
1011
|
|
|
|
|
|
|
|
1012
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
1013
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
1014
|
|
|
|
|
|
|
|
1015
|
|
|
|
|
|
|
=cut |