line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
2753745
|
use 5.026; |
|
2
|
|
|
|
|
7
|
|
2
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
107
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# ABSTRACT: Dist::Zilla configuration the way AJNN does it |
5
|
|
|
|
|
|
|
$Dist::Zilla::PluginBundle::Author::AJNN::VERSION = '0.02'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Dist::Zilla; |
8
|
2
|
|
|
2
|
|
15
|
use Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
51
|
|
9
|
2
|
|
|
2
|
|
9
|
use namespace::autoclean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
10
|
2
|
|
|
2
|
|
11060
|
|
|
2
|
|
|
|
|
38
|
|
|
2
|
|
|
|
|
14
|
|
11
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PluginBundle::Easy'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use Dist::Zilla::PluginBundle::Author::AJNN::PruneAliases; |
14
|
2
|
|
|
2
|
|
480
|
use Dist::Zilla::PluginBundle::Author::AJNN::Readme; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
53
|
|
15
|
2
|
|
|
2
|
|
326
|
use Pod::Weaver::PluginBundle::Author::AJNN; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
72
|
|
16
|
2
|
|
|
2
|
|
389
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
906
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my @mvp_multivalue_args; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
0
|
0
|
has max_target_perl => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
isa => 'Str', |
23
|
|
|
|
|
|
|
lazy => 1, |
24
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{'Test::MinimumVersion.max_target_perl'} || '' }, |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
has podweaver_skip => ( |
28
|
|
|
|
|
|
|
is => 'ro', |
29
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
30
|
|
|
|
|
|
|
lazy => 1, |
31
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{'PodWeaver.skip'} || [] }, |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
push @mvp_multivalue_args, 'PodWeaver.skip'; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
has readme => ( |
36
|
|
|
|
|
|
|
is => 'ro', |
37
|
|
|
|
|
|
|
isa => 'Str', |
38
|
|
|
|
|
|
|
lazy => 1, |
39
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{'readme'} || '' }, |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my ($self) = @_; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my $AJNN = '=' . __PACKAGE__; |
46
|
1
|
|
|
1
|
0
|
5
|
|
47
|
|
|
|
|
|
|
my @prune_aliases = ( $^O eq 'darwin' ? [ $AJNN . '::PruneAliases' => 'PruneAliases' ] : () ); |
48
|
1
|
|
|
|
|
2
|
$self->add_plugins( |
49
|
|
|
|
|
|
|
[ 'GatherDir' => { |
50
|
1
|
50
|
|
|
|
4
|
exclude_filename => [qw( |
51
|
1
|
|
|
|
|
10
|
README.md |
52
|
|
|
|
|
|
|
cpanfile |
53
|
|
|
|
|
|
|
)], |
54
|
|
|
|
|
|
|
exclude_match => [qw( |
55
|
|
|
|
|
|
|
~ |
56
|
|
|
|
|
|
|
\.webloc$ |
57
|
|
|
|
|
|
|
)], |
58
|
|
|
|
|
|
|
prune_directory => [qw( |
59
|
|
|
|
|
|
|
^cover_db$ |
60
|
|
|
|
|
|
|
^Stuff$ |
61
|
|
|
|
|
|
|
\.bbprojectd$ |
62
|
|
|
|
|
|
|
)], |
63
|
|
|
|
|
|
|
}], |
64
|
|
|
|
|
|
|
[ 'PruneCruft' ], |
65
|
|
|
|
|
|
|
@prune_aliases, |
66
|
|
|
|
|
|
|
); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
$self->add_plugins( |
69
|
|
|
|
|
|
|
[ 'CPANFile' ], |
70
|
|
|
|
|
|
|
[ 'MetaJSON' ], |
71
|
1
|
|
|
|
|
130
|
[ 'MetaYAML' ], |
72
|
|
|
|
|
|
|
[ 'MetaProvides::Package' ], |
73
|
|
|
|
|
|
|
[ 'PkgVersion' => { |
74
|
|
|
|
|
|
|
die_on_existing_version => 1, |
75
|
|
|
|
|
|
|
die_on_line_insertion => 1, |
76
|
|
|
|
|
|
|
}], |
77
|
|
|
|
|
|
|
[ 'GithubMeta' => { |
78
|
|
|
|
|
|
|
issues => 1, |
79
|
|
|
|
|
|
|
homepage => "''", |
80
|
|
|
|
|
|
|
}], |
81
|
|
|
|
|
|
|
); |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
$self->add_plugins( |
84
|
|
|
|
|
|
|
[ 'Git::Check' => { |
85
|
|
|
|
|
|
|
allow_dirty => '', |
86
|
1
|
|
|
|
|
217
|
}], |
87
|
|
|
|
|
|
|
[ 'CheckChangeLog' ], |
88
|
|
|
|
|
|
|
[ 'TestRelease' ], |
89
|
|
|
|
|
|
|
[ 'ConfirmRelease' ], |
90
|
|
|
|
|
|
|
#[ 'FakeRelease' ], |
91
|
|
|
|
|
|
|
[ 'UploadToCPAN' ], |
92
|
|
|
|
|
|
|
[ 'Git::Tag' => { |
93
|
|
|
|
|
|
|
tag_format => '%V', |
94
|
|
|
|
|
|
|
tag_message => '%V%t %{yyyy-MM-dd}d%n%c', |
95
|
|
|
|
|
|
|
}], |
96
|
|
|
|
|
|
|
); |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
my @readme = ( $AJNN . '::Readme' => 'Readme' ); |
99
|
|
|
|
|
|
|
@readme = ( $self->readme ) if $self->readme; |
100
|
|
|
|
|
|
|
$self->add_plugins( |
101
|
1
|
|
|
|
|
197
|
[ 'MakeMaker' ], |
102
|
1
|
50
|
|
|
|
30
|
#[ 'StaticInstall' => { mode => 'on' } ], |
103
|
1
|
|
|
|
|
6
|
[ @readme ], |
104
|
|
|
|
|
|
|
[ 'Manifest' ], |
105
|
|
|
|
|
|
|
); |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
my @podweaver_skip = $self->podweaver_skip->@*; |
108
|
|
|
|
|
|
|
if (@podweaver_skip) { |
109
|
|
|
|
|
|
|
$self->add_plugins([ 'FileFinder::Filter' => 'PodWeaverFiles' => { |
110
|
1
|
|
|
|
|
157
|
finder => [':InstallModules', ':ExecFiles'], |
111
|
1
|
50
|
|
|
|
11
|
skip => [@podweaver_skip], |
112
|
0
|
|
|
|
|
0
|
}]); |
113
|
|
|
|
|
|
|
@podweaver_skip = ( finder => '@Author::AJNN/PodWeaverFiles' ); |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
$self->add_plugins( |
116
|
0
|
|
|
|
|
0
|
#[ 'PodWeaverIfPod' => { |
117
|
|
|
|
|
|
|
[ 'PodWeaver' => { |
118
|
|
|
|
|
|
|
config_plugin => '@Author::AJNN', |
119
|
|
|
|
|
|
|
@podweaver_skip, |
120
|
1
|
|
|
|
|
7
|
}], |
121
|
|
|
|
|
|
|
); |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
my @test_min_version; |
124
|
|
|
|
|
|
|
@test_min_version = ( |
125
|
|
|
|
|
|
|
[ 'Test::MinimumVersion' => { |
126
|
1
|
|
|
|
|
91
|
max_target_perl => $self->max_target_perl, |
127
|
1
|
50
|
|
|
|
31
|
}], |
128
|
|
|
|
|
|
|
) if $self->max_target_perl; |
129
|
|
|
|
|
|
|
$self->add_plugins( |
130
|
|
|
|
|
|
|
@test_min_version, |
131
|
|
|
|
|
|
|
[ 'PodSyntaxTests' ], |
132
|
1
|
|
|
|
|
5
|
[ 'RunExtraTests' ], |
133
|
|
|
|
|
|
|
); |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
1; |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=pod |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=encoding UTF-8 |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head1 NAME |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Dist::Zilla::PluginBundle::Author::AJNN - Dist::Zilla configuration the way AJNN does it |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head1 VERSION |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
version 0.02 |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head1 SYNOPSIS |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
in F<dist.ini>: |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
name = Example-Dist-Name |
159
|
|
|
|
|
|
|
main_module = lib/Local/Example.pm |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
author = Jane Doe <doe@example.org> |
162
|
|
|
|
|
|
|
license = Artistic_2_0 |
163
|
|
|
|
|
|
|
copyright_holder = Jane Doe |
164
|
|
|
|
|
|
|
copyright_year = 2020 |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
version = 0.123 |
167
|
|
|
|
|
|
|
release_status = unstable |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
[@Author::AJNN] |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
[AutoPrereqs] |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
skip some parts if required: |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
[@Filter] |
176
|
|
|
|
|
|
|
-bundle = @Author::AJNN |
177
|
|
|
|
|
|
|
-remove = Git::Check |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=head1 DESCRIPTION |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
This is the configuration I use for L<Dist::Zilla>. |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
(Most likely you don't want or need to read this.) |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=head1 OVERVIEW |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
This plugin bundle is nearly equivalent to the following C<dist.ini> config: |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
[GatherDir] |
190
|
|
|
|
|
|
|
exclude_filename = README.md |
191
|
|
|
|
|
|
|
exclude_filename = cpanfile |
192
|
|
|
|
|
|
|
exclude_match = ~|\.webloc$ |
193
|
|
|
|
|
|
|
prune_directory = ^cover_db$|^Stuff$|\.bbprojectd$ |
194
|
|
|
|
|
|
|
[PruneCruft] |
195
|
|
|
|
|
|
|
[@Author::AJNN::PruneAliases] |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
[CPANFile] |
198
|
|
|
|
|
|
|
[MetaJSON] |
199
|
|
|
|
|
|
|
[MetaYAML] |
200
|
|
|
|
|
|
|
[MetaProvides::Package] |
201
|
|
|
|
|
|
|
[PkgVersion] |
202
|
|
|
|
|
|
|
die_on_existing_version = 1 |
203
|
|
|
|
|
|
|
die_on_line_insertion = 1 |
204
|
|
|
|
|
|
|
[GithubMeta] |
205
|
|
|
|
|
|
|
issues = 1 |
206
|
|
|
|
|
|
|
homepage = '' |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
[Git::Check] |
209
|
|
|
|
|
|
|
allow_dirty = |
210
|
|
|
|
|
|
|
[CheckChangeLog] |
211
|
|
|
|
|
|
|
[TestRelease] |
212
|
|
|
|
|
|
|
[ConfirmRelease] |
213
|
|
|
|
|
|
|
[UploadToCPAN] |
214
|
|
|
|
|
|
|
[Git::Tag] |
215
|
|
|
|
|
|
|
tag_format = '%V' |
216
|
|
|
|
|
|
|
tag_message = '%V%t %{yyyy-MM-dd}d%n%c' |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
[MakeMaker] |
219
|
|
|
|
|
|
|
[@Author::AJNN::Readme] |
220
|
|
|
|
|
|
|
[Manifest] |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
[FileFinder::Filter / PodWeaverFiles] |
223
|
|
|
|
|
|
|
finder = :InstallModules |
224
|
|
|
|
|
|
|
finder = :ExecFiles |
225
|
|
|
|
|
|
|
[PodWeaver] |
226
|
|
|
|
|
|
|
finder = PodWeaverFiles |
227
|
|
|
|
|
|
|
config_plugin = @Author::AJNN |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
[Test::MinimumVersion] |
230
|
|
|
|
|
|
|
[PodSyntaxTests] |
231
|
|
|
|
|
|
|
[RunExtraTests] |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
=head2 PodWeaver.skip |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
L<PodWeaver> will not be applied to a file that matches any of these |
238
|
|
|
|
|
|
|
regular expressions. May be given multiple times. |
239
|
|
|
|
|
|
|
See L<Dist::Zilla::Plugin::FileFinder::Filter/"skip">. |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
PodWeaver.skip = \.pod$ |
242
|
|
|
|
|
|
|
PodWeaver.skip = Net/(?:SSL|TLS) |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
=head2 readme |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
The plugin name to be used to generate a readme. The default is to use |
247
|
|
|
|
|
|
|
L<Dist::Zilla::PluginBundle::Author::AJNN::Readme>. |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
readme = Readme::Brief |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
=head2 Test::MinimumVersion.max_target_perl |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
A syntax test for the specified target version will be generated. |
254
|
|
|
|
|
|
|
If omitted or set to C<0>, the test will not be generated. |
255
|
|
|
|
|
|
|
See L<Dist::Zilla::Plugin::Test::MinimumVersion>. |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
Test::MinimumVersion.max_target_perl = v5.26 |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
=head1 BUGS |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
This configuration is hacked together specifically for AJNN's needs. |
262
|
|
|
|
|
|
|
It has not been designed with extensibility or reusability in mind. |
263
|
|
|
|
|
|
|
No forward or backward compatibility should be expected. |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
=head1 SEE ALSO |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
L<Dist::Zilla::PluginBundle::Author::AJNN::Readme> |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
L<Pod::Weaver::PluginBundle::Author::AJNN> |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
L<Dist::Zilla::Role::PluginBundle::Easy> |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
L<Dist::Zilla::PluginBundle::Filter> |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
=head1 AUTHOR |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
Arne Johannessen <ajnn@cpan.org> |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
If you contact me by email, please make sure you include the word |
280
|
|
|
|
|
|
|
"Perl" in your subject header to help beat the spam filters. |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
Arne Johannessen has dedicated the work to the Commons by waiving all of his |
285
|
|
|
|
|
|
|
or her rights to the work worldwide under copyright law and all related or |
286
|
|
|
|
|
|
|
neighboring legal rights he or she had in the work, to the extent allowable by |
287
|
|
|
|
|
|
|
law. |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
Works under CC0 do not require attribution. When citing the work, you should |
290
|
|
|
|
|
|
|
not imply endorsement by the author. |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
=cut |