line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- copyright and license --- |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# file: lib/Dist/Zilla/PluginBundle/Author/VDB.pm |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Copyright © 2015 Van de Bugger |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# This file is part of perl-Dist-Zilla-PluginBundle-Author-VDB. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# perl-Dist-Zilla-PluginBundle-Author-VDB is free software: you can redistribute it and/or modify |
10
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by the Free Software |
11
|
|
|
|
|
|
|
# Foundation, either version 3 of the License, or (at your option) any later version. |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# perl-Dist-Zilla-PluginBundle-Author-VDB is distributed in the hope that it will be useful, but |
14
|
|
|
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
15
|
|
|
|
|
|
|
# PARTICULAR PURPOSE. See the GNU General Public License for more details. |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License along with |
18
|
|
|
|
|
|
|
# perl-Dist-Zilla-PluginBundle-Author-VDB. If not, see <http://www.gnu.org/licenses/>. |
19
|
|
|
|
|
|
|
# |
20
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- copyright and license --- |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#pod =head1 DESCRIPTION |
23
|
|
|
|
|
|
|
#pod |
24
|
|
|
|
|
|
|
#pod It is unlikely that someone else will want to use it, so I will not bother with documenting it, at |
25
|
|
|
|
|
|
|
#pod least for now. |
26
|
|
|
|
|
|
|
#pod |
27
|
|
|
|
|
|
|
#pod =for Pod::Coverage configure |
28
|
|
|
|
|
|
|
#pod |
29
|
|
|
|
|
|
|
#pod =cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
package Dist::Zilla::PluginBundle::Author::VDB; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
3200823
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
34
|
1
|
|
|
1
|
|
8068
|
use namespace::autoclean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
35
|
1
|
|
|
1
|
|
124
|
use version 0.77; |
|
1
|
|
|
|
|
45
|
|
|
1
|
|
|
|
|
24
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# PODNAME: Dist::Zilla::PluginBundle::Author::VDB |
38
|
|
|
|
|
|
|
# ABSTRACT: VDB's plugin bundle |
39
|
|
|
|
|
|
|
our $VERSION = 'v0.11.2_04'; # TRIAL VERSION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PluginBundle::Easy'; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# These modules used by the bundle directly. |
44
|
1
|
|
|
1
|
|
160
|
use Carp qw{ croak }; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
163
|
|
45
|
1
|
|
|
1
|
|
1028
|
use Dist::Zilla::File::InMemory; |
|
1
|
|
|
|
|
106067
|
|
|
1
|
|
|
|
|
74
|
|
46
|
1
|
|
|
1
|
|
12
|
use Dist::Zilla::File::OnDisk; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
47
|
1
|
|
|
1
|
|
8
|
use Path::Tiny; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
114
|
|
48
|
1
|
|
|
1
|
|
8
|
use Sub::Exporter::ForMethods qw{ method_installer }; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
49
|
1
|
|
|
1
|
|
459
|
use Data::Section { installer => method_installer }, -setup; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
# These modules are used by hooks. Require all the modules explicitly now to avoid unexpected |
52
|
|
|
|
|
|
|
# failures in the middle of build or release. |
53
|
1
|
|
|
1
|
|
2017
|
use File::chdir (); |
|
1
|
|
|
|
|
2523
|
|
|
1
|
|
|
|
|
39
|
|
54
|
1
|
|
|
1
|
|
904
|
use IPC::Run3 (); |
|
1
|
|
|
|
|
12709
|
|
|
1
|
|
|
|
|
28
|
|
55
|
1
|
|
|
1
|
|
1235
|
use IPC::System::Simple (); |
|
1
|
|
|
|
|
6287
|
|
|
1
|
|
|
|
|
56
|
|
56
|
1
|
|
|
1
|
|
12
|
use Path::Tiny 0.070 (); |
|
1
|
|
|
|
|
35
|
|
|
1
|
|
|
|
|
1985
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
#pod =option minimum_perl |
61
|
|
|
|
|
|
|
#pod |
62
|
|
|
|
|
|
|
#pod Optional, default value C<5.006>. |
63
|
|
|
|
|
|
|
#pod |
64
|
|
|
|
|
|
|
#pod =cut |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
has minimum_perl => ( |
67
|
|
|
|
|
|
|
is => 'ro', |
68
|
|
|
|
|
|
|
isa => 'Str', |
69
|
|
|
|
|
|
|
lazy => 1, |
70
|
|
|
|
|
|
|
default => sub { |
71
|
|
|
|
|
|
|
my ( $self ) = @_; |
72
|
|
|
|
|
|
|
return $self->payload->{ minimum_perl } // '5.006'; |
73
|
|
|
|
|
|
|
}, |
74
|
|
|
|
|
|
|
); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
#pod =option copying |
79
|
|
|
|
|
|
|
#pod |
80
|
|
|
|
|
|
|
#pod Name of POD file to generate distribution F<COPYING> text file. Empty value disables generation |
81
|
|
|
|
|
|
|
#pod F<COPYING> file. |
82
|
|
|
|
|
|
|
#pod |
83
|
|
|
|
|
|
|
#pod C<Str>, optional, default value C<doc/copying.pod>. |
84
|
|
|
|
|
|
|
#pod |
85
|
|
|
|
|
|
|
#pod =cut |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
has copying => ( |
88
|
|
|
|
|
|
|
is => 'ro', |
89
|
|
|
|
|
|
|
isa => 'Str', |
90
|
|
|
|
|
|
|
lazy => 1, |
91
|
|
|
|
|
|
|
default => sub { |
92
|
|
|
|
|
|
|
my ( $self ) = @_; |
93
|
|
|
|
|
|
|
return $self->payload->{ copying } // 'doc/copying.pod'; |
94
|
|
|
|
|
|
|
}, |
95
|
|
|
|
|
|
|
); |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
#pod =option readme |
100
|
|
|
|
|
|
|
#pod |
101
|
|
|
|
|
|
|
#pod Names of POD files to generate distribution F<README> text file. This is a multi-value option. |
102
|
|
|
|
|
|
|
#pod Empty values are ignored. Empty list disables generating F<README> file. |
103
|
|
|
|
|
|
|
#pod |
104
|
|
|
|
|
|
|
#pod C<ArrayRef[Str]>, optional, default value C<[ 'doc/what.pod', 'doc/why.pod', 'doc/naming.pod', 'doc/forms.pod', 'doc/source.pod', 'doc/distribution.pod', 'doc/installing.pod', 'doc/hacking.pod', 'doc/documentation.pod', 'doc/feedback.pod', 'doc/glossary.pod' ]>. |
105
|
|
|
|
|
|
|
#pod |
106
|
|
|
|
|
|
|
#pod =cut |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
has readme => ( |
109
|
|
|
|
|
|
|
is => 'ro', |
110
|
|
|
|
|
|
|
isa => 'Maybe[ArrayRef[Str]]', |
111
|
|
|
|
|
|
|
lazy => 1, |
112
|
|
|
|
|
|
|
default => sub { |
113
|
|
|
|
|
|
|
my ( $self ) = @_; |
114
|
|
|
|
|
|
|
my $readme = $self->payload->{ readme } // [ 'doc/what.pod', 'doc/why.pod', 'doc/naming.pod', 'doc/forms.pod', 'doc/source.pod', 'doc/distribution.pod', 'doc/installing.pod', 'doc/hacking.pod', 'doc/documentation.pod', 'doc/feedback.pod', 'doc/glossary.pod' ]; |
115
|
|
|
|
|
|
|
$readme = [ grep( { $_ ne '' } @$readme ) ]; # Ignore empty items. |
116
|
|
|
|
|
|
|
if ( not @$readme ) { |
117
|
|
|
|
|
|
|
$readme = undef; |
118
|
|
|
|
|
|
|
}; |
119
|
|
|
|
|
|
|
return $readme; |
120
|
|
|
|
|
|
|
}, |
121
|
|
|
|
|
|
|
); |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
#pod =option local_release |
126
|
|
|
|
|
|
|
#pod |
127
|
|
|
|
|
|
|
#pod If true, release will be a local one, i. e. no external operations will be done: C<UploadToCPAN> |
128
|
|
|
|
|
|
|
#pod and C<hg push> will be skipped, <hg tag> will create a local tag. |
129
|
|
|
|
|
|
|
#pod |
130
|
|
|
|
|
|
|
#pod Option can be set trough F<dist.ini> file or with C<DZIL_LOCAL_RELEASE> environment variable. |
131
|
|
|
|
|
|
|
#pod |
132
|
|
|
|
|
|
|
#pod Optional, default value is 0. |
133
|
|
|
|
|
|
|
#pod |
134
|
|
|
|
|
|
|
#pod =cut |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
has local_release => ( |
137
|
|
|
|
|
|
|
is => 'ro', |
138
|
|
|
|
|
|
|
isa => 'Bool', |
139
|
|
|
|
|
|
|
lazy => 1, |
140
|
|
|
|
|
|
|
default => sub { |
141
|
|
|
|
|
|
|
my ( $self ) = @_; |
142
|
|
|
|
|
|
|
return $self->payload->{ local_release } // $ENV{ DZIL_LOCAL_RELEASE }; |
143
|
|
|
|
|
|
|
}, |
144
|
|
|
|
|
|
|
); |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
#pod =option archive |
149
|
|
|
|
|
|
|
#pod |
150
|
|
|
|
|
|
|
#pod Directory to archive files to. If empty, release will not be archived. If such directory does not |
151
|
|
|
|
|
|
|
#pod exist, it will be created before release. |
152
|
|
|
|
|
|
|
#pod |
153
|
|
|
|
|
|
|
#pod Optional, default value C<".releases">. |
154
|
|
|
|
|
|
|
#pod |
155
|
|
|
|
|
|
|
#pod =cut |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
has archive => ( |
158
|
|
|
|
|
|
|
is => 'ro', |
159
|
|
|
|
|
|
|
isa => 'Str', |
160
|
|
|
|
|
|
|
lazy => 1, |
161
|
|
|
|
|
|
|
default => sub { |
162
|
|
|
|
|
|
|
my ( $self ) = @_; |
163
|
|
|
|
|
|
|
return $self->payload->{ archive } // ".releases"; |
164
|
|
|
|
|
|
|
}, |
165
|
|
|
|
|
|
|
); |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
#pod =option templates |
170
|
|
|
|
|
|
|
#pod |
171
|
|
|
|
|
|
|
#pod This option will be passed to C<Templates> plugin. If you no not want C<Templates> to process |
172
|
|
|
|
|
|
|
#pod files, specify C<:NoFiles>. This is multi-value option (i. e. may be specified several times). |
173
|
|
|
|
|
|
|
#pod |
174
|
|
|
|
|
|
|
#pod Optional, default value C<[ ':InstallModules' ]>. |
175
|
|
|
|
|
|
|
#pod |
176
|
|
|
|
|
|
|
#pod =cut |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
has templates => ( |
179
|
|
|
|
|
|
|
is => 'ro', |
180
|
|
|
|
|
|
|
isa => 'Maybe[ArrayRef[Str]]', |
181
|
|
|
|
|
|
|
lazy => 1, |
182
|
|
|
|
|
|
|
default => sub { |
183
|
|
|
|
|
|
|
my ( $self ) = @_; |
184
|
|
|
|
|
|
|
my $templates = $self->payload->{ templates } // [ ':InstallModules' ]; |
185
|
|
|
|
|
|
|
$templates = [ grep( { $_ ne '' } @$templates ) ]; # Ignore empty items. |
186
|
|
|
|
|
|
|
if ( not @$templates ) { |
187
|
|
|
|
|
|
|
$templates = undef; |
188
|
|
|
|
|
|
|
}; |
189
|
|
|
|
|
|
|
return $templates; |
190
|
|
|
|
|
|
|
}, |
191
|
|
|
|
|
|
|
); |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
#pod =option unwanted_module |
196
|
|
|
|
|
|
|
#pod |
197
|
|
|
|
|
|
|
#pod =option unwanted_modules |
198
|
|
|
|
|
|
|
#pod |
199
|
|
|
|
|
|
|
#pod TODO C<[ qw{ DDP Data::Printer } ]>. |
200
|
|
|
|
|
|
|
#pod |
201
|
|
|
|
|
|
|
#pod =cut |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
has unwanted_modules => ( |
204
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
205
|
|
|
|
|
|
|
is => 'ro', |
206
|
|
|
|
|
|
|
lazy => 1, |
207
|
|
|
|
|
|
|
default => sub { |
208
|
|
|
|
|
|
|
my ( $self ) = @_; |
209
|
|
|
|
|
|
|
my $p = $self->payload; |
210
|
|
|
|
|
|
|
my $u1 = $p->{ unwanted_module }; |
211
|
|
|
|
|
|
|
my $u2 = $p->{ unwanted_modules }; |
212
|
|
|
|
|
|
|
return $u1 || $u2 ? [ $u1 ? @$u1 : (), $u2 ? @$u2 : () ] : [ qw{ DDP Data::Printer } ]; |
213
|
|
|
|
|
|
|
}, |
214
|
|
|
|
|
|
|
); |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
#pod =option spellchecker |
219
|
|
|
|
|
|
|
#pod |
220
|
|
|
|
|
|
|
#pod Command to run spellchecker. Spellchecker command is expected to read text from stdin, and print to |
221
|
|
|
|
|
|
|
#pod stdout misspelled words. If empty, spellchecking will be skipped. This involve C<Test::PodSpelling> |
222
|
|
|
|
|
|
|
#pod plugin and internally implemented checking the F<Changes> file. |
223
|
|
|
|
|
|
|
#pod |
224
|
|
|
|
|
|
|
#pod Optional, default value C<aspell list -l en -p ./xt/aspell-en.pws>. |
225
|
|
|
|
|
|
|
#pod |
226
|
|
|
|
|
|
|
#pod =cut |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
has spellchecker => ( |
229
|
|
|
|
|
|
|
is => 'ro', |
230
|
|
|
|
|
|
|
isa => 'Str', |
231
|
|
|
|
|
|
|
lazy => 1, |
232
|
|
|
|
|
|
|
default => sub { |
233
|
|
|
|
|
|
|
my ( $self ) = @_; |
234
|
|
|
|
|
|
|
return $self->payload->{ spellchecker } // 'aspell list -l en -p ./xt/aspell-en.pws'; |
235
|
|
|
|
|
|
|
# Leading dot (in `./xt/aspell.en.pws`) is important! Whitout the dot `aspell` |
236
|
|
|
|
|
|
|
# fails to find the dictionary. |
237
|
|
|
|
|
|
|
}, |
238
|
|
|
|
|
|
|
); |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
#pod =option repository |
243
|
|
|
|
|
|
|
#pod |
244
|
|
|
|
|
|
|
#pod Mercurial repository to push changes after release to. Option may be specified multiple times to |
245
|
|
|
|
|
|
|
#pod push changes into several repositories. By default changes are pushed to one repository C<default>. |
246
|
|
|
|
|
|
|
#pod |
247
|
|
|
|
|
|
|
#pod =cut |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
has repository => ( |
250
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
251
|
|
|
|
|
|
|
is => 'ro', |
252
|
|
|
|
|
|
|
lazy => 1, |
253
|
|
|
|
|
|
|
default => sub { |
254
|
|
|
|
|
|
|
my ( $self ) = @_; |
255
|
|
|
|
|
|
|
return $self->payload->{ repository } // [ 'default' ]; |
256
|
|
|
|
|
|
|
}, |
257
|
|
|
|
|
|
|
); |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
#pod =option installer |
262
|
|
|
|
|
|
|
#pod |
263
|
|
|
|
|
|
|
#pod TODO |
264
|
|
|
|
|
|
|
#pod |
265
|
|
|
|
|
|
|
#pod =cut |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
has installer => ( |
268
|
|
|
|
|
|
|
isa => 'Str', |
269
|
|
|
|
|
|
|
is => 'ro', |
270
|
|
|
|
|
|
|
lazy => 1, |
271
|
|
|
|
|
|
|
default => sub { |
272
|
|
|
|
|
|
|
my ( $self ) = @_; |
273
|
|
|
|
|
|
|
return $self->payload->{ installer } // 'ModuleBuildTiny'; |
274
|
|
|
|
|
|
|
}, |
275
|
|
|
|
|
|
|
); |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
#pod =method mvp_multivalue_args |
280
|
|
|
|
|
|
|
#pod |
281
|
|
|
|
|
|
|
#pod =cut |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
sub mvp_multivalue_args { |
284
|
7
|
|
|
7
|
1
|
1172615
|
return qw{ templates unwanted_module unwanted_modules readme repository }; |
285
|
|
|
|
|
|
|
}; |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
#pod =method _quote |
290
|
|
|
|
|
|
|
#pod |
291
|
|
|
|
|
|
|
#pod Convert an attribute to a form suitable for using in source. C<Str> attribute is converted into a |
292
|
|
|
|
|
|
|
#pod string literal, C<ArrayRef> attribute is converted to a list of string literals. |
293
|
|
|
|
|
|
|
#pod |
294
|
|
|
|
|
|
|
#pod =cut |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
sub _quote { |
297
|
19
|
|
|
19
|
|
42
|
my ( $self, @args ) = @_; |
298
|
19
|
|
|
|
|
38
|
my @names; |
299
|
19
|
|
|
|
|
47
|
for my $arg ( @args ) { |
300
|
19
|
100
|
|
|
|
68
|
for ( ref( $arg ) eq 'ARRAY' ? @$arg : $arg ) { |
301
|
77
|
|
|
|
|
82
|
my $name = $_; |
302
|
77
|
|
|
|
|
119
|
$name =~ s{([\\'])}{\$1}gx; |
303
|
77
|
|
|
|
|
191
|
push( @names, "'$name'" ); |
304
|
|
|
|
|
|
|
}; |
305
|
|
|
|
|
|
|
}; |
306
|
19
|
|
|
|
|
1136
|
return join( ', ', @names ); |
307
|
|
|
|
|
|
|
}; |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
# Helper func: Iterate through distribution prerequisities. |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
sub MY::prereqs($$) { ## no critic ( ProhibitSubroutinePrototypes ) |
314
|
14
|
|
|
14
|
|
7779415
|
my ( $plugin, $callback ) = @_; |
315
|
14
|
|
|
|
|
567
|
my $prereqs = $plugin->zilla->prereqs->cpan_meta_prereqs; |
316
|
14
|
|
|
|
|
1004
|
for my $phase ( $prereqs->__legal_phases ) { |
317
|
70
|
|
|
|
|
244
|
for my $type ( $prereqs->__legal_types ) { |
318
|
280
|
50
|
|
|
|
874
|
my $reqs = $prereqs->requirements_for( $phase, $type ) or next; |
319
|
280
|
|
|
|
|
7062
|
for my $module ( keys( %{ $reqs->{ requirements } } ) ) { |
|
280
|
|
|
|
|
1008
|
|
320
|
644
|
|
|
|
|
2191
|
$callback->( $plugin, $module, $phase, $type, $reqs ); |
321
|
|
|
|
|
|
|
}; |
322
|
|
|
|
|
|
|
}; |
323
|
|
|
|
|
|
|
}; |
324
|
14
|
|
|
|
|
257
|
return; |
325
|
|
|
|
|
|
|
}; |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
sub MY::file { |
328
|
63
|
|
|
63
|
|
1408906
|
my ( $plugin, $name ) = @_; |
329
|
63
|
|
|
|
|
115
|
our $Self; ## no critic ( ProhibitPackageVars ) |
330
|
63
|
|
|
|
|
408
|
my $data = $Self->merged_section_data; |
331
|
63
|
|
|
|
|
26979
|
my $root = path( $plugin->zilla->root ); |
332
|
63
|
|
|
|
|
5495
|
my $file; |
333
|
63
|
100
|
|
|
|
245
|
if ( $root->child( $name )->exists ) { |
|
|
50
|
|
|
|
|
|
334
|
18
|
|
|
|
|
2177
|
$file = Dist::Zilla::File::OnDisk->new( { |
335
|
|
|
|
|
|
|
name => $name, |
336
|
|
|
|
|
|
|
} ); |
337
|
|
|
|
|
|
|
} elsif ( $data->{ $name } ) { |
338
|
|
|
|
|
|
|
$file = Dist::Zilla::File::InMemory->new( { |
339
|
|
|
|
|
|
|
name => $name, |
340
|
45
|
|
|
|
|
3442
|
content => ${ $data->{ $name } }, |
|
45
|
|
|
|
|
2117
|
|
341
|
|
|
|
|
|
|
} ); |
342
|
|
|
|
|
|
|
} else { |
343
|
0
|
|
|
|
|
0
|
croak "$name: file not found"; |
344
|
|
|
|
|
|
|
}; |
345
|
63
|
|
|
|
|
19965
|
return $file; |
346
|
|
|
|
|
|
|
}; |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------- |
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
sub configure { |
351
|
|
|
|
|
|
|
|
352
|
7
|
|
|
7
|
0
|
36
|
my ( $self ) = @_; |
353
|
7
|
|
|
|
|
17
|
our $Self = $self; ## no critic ( ProhibitPackageVars ) |
354
|
7
|
|
|
|
|
232
|
my $name = $self->name; |
355
|
|
|
|
|
|
|
|
356
|
7
|
|
|
|
|
1523
|
require Dist::Zilla::Plugin::Manifest::Write; |
357
|
|
|
|
|
|
|
# Make sure the plugin is loaded before checking its version. |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
$self->add_plugins( |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
[ 'Hook' => 'prologue' => { |
362
|
|
|
|
|
|
|
# DOES NOT WORK because plugin name will be '$name/prologue'. |
363
|
|
|
|
|
|
|
'hook' => [ q{ |
364
|
|
|
|
|
|
|
use autodie ':all'; |
365
|
|
|
|
|
|
|
use IPC::System::Simple qw{ capture }; |
366
|
|
|
|
|
|
|
use Path::Tiny; |
367
|
|
|
|
|
|
|
} ], |
368
|
|
|
|
|
|
|
} ], |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
[ 'Author::VDB::Version::Read', ], |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
[ 'Hook::Init' => 'init stuff' => { |
373
|
|
|
|
|
|
|
'hook' => [ q[ |
374
|
|
|
|
|
|
|
$dist->license->{ program } = 'perl-' . $dist->name; |
375
|
|
|
|
|
|
|
{ pack] . q[age MY; # Hide declaration from `new-version.t`. |
376
|
|
|
|
|
|
|
our $name = $dist->name; |
377
|
|
|
|
|
|
|
( our $package = $name ) =~ s{-}{::}g; |
378
|
|
|
|
|
|
|
our $version = $dist->version; |
379
|
|
|
|
|
|
|
our $Abstract = $dist->abstract; |
380
|
|
|
|
|
|
|
our $abstract = lcfirst( $Abstract ); |
381
|
|
|
|
|
|
|
our $author = $dist->authors->[ -1 ]; |
382
|
|
|
|
|
|
|
our $metacpan = "https://metacpan.org/release/$name"; |
383
|
|
|
|
|
|
|
our $cpan_rt_mailto = "mailto:bug-$name\@rt.cpan.org"; |
384
|
|
|
|
|
|
|
our $cpan_rt_browse = "https://rt.cpan.org/Public/Dist/Display.html?Name=$name"; |
385
|
|
|
|
|
|
|
our $cpan_rt_report = "https://rt.cpan.org/Public/Bug/Report.html?Queue=$name"; |
386
|
|
|
|
|
|
|
our $repo_type ||= "hg"; |
387
|
|
|
|
|
|
|
our $repo_host ||= "fedorapeople.org"; |
388
|
|
|
|
|
|
|
our $repo_url ||= "https://vandebugger.$repo_host/hg/perl-$name"; |
389
|
|
|
|
|
|
|
our $repo_web ||= undef; |
390
|
|
|
|
|
|
|
our $repo_clone = "$repo_type clone $repo_url" . |
391
|
|
|
|
|
|
|
( $repo_url =~ m{/\Qperl-$name\E\z} ? '' : " \\\\\\n perl-$name" ); |
392
|
|
|
|
|
|
|
our $bundle = $Dist::Zilla::PluginBundle::Author::VDB::Self; |
393
|
|
|
|
|
|
|
}; |
394
|
|
|
|
|
|
|
$ENV{ 'TEST_FIX' . 'ME_FORMAT' } = 'perl'; # Hide keyword from `fixme.t`. |
395
|
|
|
|
|
|
|
] ], |
396
|
|
|
|
|
|
|
} ], |
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
# |
399
|
|
|
|
|
|
|
# Files to include |
400
|
|
|
|
|
|
|
# |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
[ 'Manifest::Read' ], # REQUIRED VERSION: v0.5.0 |
403
|
|
|
|
|
|
|
# Colon-prefixed file finders (e. g. 'Manifest::Read/:AllFiles') are used. |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
# |
406
|
|
|
|
|
|
|
# Generated files |
407
|
|
|
|
|
|
|
# |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
$self->copying ne '' ? ( |
410
|
|
|
|
|
|
|
[ 'GenerateFile' => 'COPYING' => { |
411
|
|
|
|
|
|
|
'filename' => 'COPYING', |
412
|
|
|
|
|
|
|
'content' => [ |
413
|
|
|
|
|
|
|
q[{] . q[{], |
414
|
|
|
|
|
|
|
q[ include( MY::file( $plugin, ] . $self->_quote( $self->copying ) . q[ ) ) ], |
415
|
|
|
|
|
|
|
q[ ->fill_in ], |
416
|
|
|
|
|
|
|
q[ ->pod2text( width => 80, indent => 0, loose => 1, quotes => 'none' ) ], |
417
|
|
|
|
|
|
|
q[ ->chomp; ], |
418
|
|
|
|
|
|
|
# Resulting file may have one or two empty lines at the end, it affects |
419
|
|
|
|
|
|
|
# testing. Let's try to chomp empty lines to avoid it. |
420
|
|
|
|
|
|
|
q[}] . q[}], # One newline will be added there. |
421
|
|
|
|
|
|
|
], |
422
|
|
|
|
|
|
|
} ], |
423
|
|
|
|
|
|
|
) : ( |
424
|
|
|
|
|
|
|
), |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
$self->readme ? ( |
427
|
|
|
|
|
|
|
[ 'GenerateFile' => 'README' => { |
428
|
|
|
|
|
|
|
'filename' => 'README', |
429
|
|
|
|
|
|
|
'content' => [ |
430
|
|
|
|
|
|
|
q[{] . q[{], |
431
|
|
|
|
|
|
|
q[join( ], |
432
|
|
|
|
|
|
|
q[ "\n\n", ], |
433
|
|
|
|
|
|
|
q[ map( ], |
434
|
|
|
|
|
|
|
q[ { ], |
435
|
|
|
|
|
|
|
q[ include( MY::file( $plugin, $_ ) ) ], |
436
|
|
|
|
|
|
|
q[ ->fill_in ], |
437
|
|
|
|
|
|
|
q[ ->pod2text( width => 80, indent => 0, loose => 1, quotes => 'none' ) ], |
438
|
|
|
|
|
|
|
q[ ->chomp ], |
439
|
|
|
|
|
|
|
q[ } ], |
440
|
|
|
|
|
|
|
q[ ] . $self->_quote( $self->readme ) . q[ ], |
441
|
|
|
|
|
|
|
q[ ) ], |
442
|
|
|
|
|
|
|
q[); ], |
443
|
|
|
|
|
|
|
q[}] . q[}], # One newline will be added there. |
444
|
|
|
|
|
|
|
], |
445
|
|
|
|
|
|
|
} ], |
446
|
|
|
|
|
|
|
) : ( |
447
|
|
|
|
|
|
|
), |
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
[ 'Manifest::Write' => { # REQUIRED VERSION: v0.9.6 |
450
|
|
|
|
|
|
|
# `Manifest::Write` v0.9.0 strictly requires plugin names, not monikers. |
451
|
|
|
|
|
|
|
# `Manifest::Write` v0.9.6 provides `exclude_files` option. |
452
|
|
|
|
|
|
|
'source_provider' => [ |
453
|
|
|
|
|
|
|
"$name/Manifest::Read", |
454
|
|
|
|
|
|
|
$self->copying ne '' ? "$name/COPYING" : (), |
455
|
|
|
|
|
|
|
$self->readme ? "$name/README" : (), |
456
|
|
|
|
|
|
|
], |
457
|
|
|
|
|
|
|
'metainfo_provider' => [ |
458
|
|
|
|
|
|
|
# Defaults are not suitable because they are just `MetaJSON` and `MetaYAML`. |
459
|
|
|
|
|
|
|
"$name/Manifest::Write", |
460
|
|
|
|
|
|
|
"$name/MetaJSON", |
461
|
|
|
|
|
|
|
"$name/MetaYAML", |
462
|
|
|
|
|
|
|
], |
463
|
|
|
|
|
|
|
'exclude_files' => [ |
464
|
|
|
|
|
|
|
":ExtraTestFiles", |
465
|
|
|
|
|
|
|
], |
466
|
|
|
|
|
|
|
} ], |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
# |
469
|
|
|
|
|
|
|
# File mungers |
470
|
|
|
|
|
|
|
# |
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
[ 'Templates' => { # REQUIRED VERSION: v0.5.0 # for including `Dist::Zilla::File` objects. |
473
|
|
|
|
|
|
|
'templates' => [ |
474
|
|
|
|
|
|
|
"$name/src doc", |
475
|
7
|
100
|
100
|
|
|
246124
|
@{ $self->templates // [] }, |
|
7
|
100
|
|
|
|
373
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
476
|
|
|
|
|
|
|
], |
477
|
|
|
|
|
|
|
} ], |
478
|
|
|
|
|
|
|
|
479
|
|
|
|
|
|
|
[ 'OurPkgVersion' ], |
480
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
[ 'SurgicalPodWeaver' => { |
482
|
|
|
|
|
|
|
'config_plugin' => '@Author::VDB', # REQUIRE: Pod::Weaver::PluginBundle::Author::VDB |
483
|
|
|
|
|
|
|
'replacer' => 'replace_with_comment', |
484
|
|
|
|
|
|
|
} ], |
485
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
[ 'FileFinder::ByName' => 'src doc' => { |
487
|
|
|
|
|
|
|
# Plugin name will be `$name/doc`. |
488
|
|
|
|
|
|
|
'file' => [ |
489
|
|
|
|
|
|
|
$self->copying ne '' ? ( 'COPYING' ) : (), |
490
|
|
|
|
|
|
|
$self->readme ? ( 'README' ) : (), |
491
|
|
|
|
|
|
|
], |
492
|
|
|
|
|
|
|
} ], |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
# |
495
|
|
|
|
|
|
|
# Update sources |
496
|
|
|
|
|
|
|
# |
497
|
|
|
|
|
|
|
|
498
|
|
|
|
|
|
|
# Copy built doc files back to source directory. |
499
|
|
|
|
|
|
|
[ 'Hook::AfterBuild' => 'update src doc' => { |
500
|
|
|
|
|
|
|
'hook' => [ q{ |
501
|
|
|
|
|
|
|
use Path::Tiny; |
502
|
|
|
|
|
|
|
my $files = $zilla->plugin_named( '} . $name . q{/src doc' )->find_files(); |
503
|
|
|
|
|
|
|
my $build = path( $arg->{ build_root } ); |
504
|
|
|
|
|
|
|
my $root = path( $dist->root ); |
505
|
|
|
|
|
|
|
for my $file ( @$files ) { |
506
|
|
|
|
|
|
|
my $new_file = $build->child( $file->name ); |
507
|
|
|
|
|
|
|
my $old_file = $root->child( $file->name ); |
508
|
|
|
|
|
|
|
my $new_bulk = $new_file->slurp; |
509
|
|
|
|
|
|
|
my $old_bulk = $old_file->exists ? $old_file->slurp : undef; |
510
|
|
|
|
|
|
|
if ( not defined( $old_bulk ) or $new_bulk ne $old_bulk ) { |
511
|
|
|
|
|
|
|
$self->log( [ 'updating %s', $file->name ] ); |
512
|
|
|
|
|
|
|
$old_file->append( { truncate => 1 }, $new_bulk ); |
513
|
|
|
|
|
|
|
# `append` is not atomic, but does not reset file mode. |
514
|
|
|
|
|
|
|
}; |
515
|
|
|
|
|
|
|
}; |
516
|
|
|
|
|
|
|
} ], |
517
|
|
|
|
|
|
|
} ], |
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
# |
520
|
|
|
|
|
|
|
# Tests |
521
|
|
|
|
|
|
|
# |
522
|
|
|
|
|
|
|
|
523
|
|
|
|
|
|
|
[ 'Test::DiagINC' ], |
524
|
|
|
|
|
|
|
|
525
|
|
|
|
|
|
|
# Files |
526
|
|
|
|
|
|
|
|
527
|
|
|
|
|
|
|
[ 'Test::Portability' ], # Checks filenames. |
528
|
|
|
|
|
|
|
|
529
|
|
|
|
|
|
|
[ 'Test::EOL' => { |
530
|
|
|
|
|
|
|
'finder' => "$name/Manifest::Read/:AllFiles", |
531
|
|
|
|
|
|
|
} ], |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
[ 'Test::NoTabs' => { |
534
|
|
|
|
|
|
|
'finder' => "$name/Manifest::Read/:AllFiles", |
535
|
|
|
|
|
|
|
} ], |
536
|
|
|
|
|
|
|
|
537
|
|
|
|
|
|
|
[ 'MojibakeTests' ], |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
# Code |
540
|
|
|
|
|
|
|
|
541
|
|
|
|
|
|
|
[ 'Test::Compile' => { |
542
|
|
|
|
|
|
|
'fake_home' => 1, |
543
|
|
|
|
|
|
|
} ], |
544
|
|
|
|
|
|
|
|
545
|
|
|
|
|
|
|
[ 'Test::Version' => { # All modules have version. |
546
|
|
|
|
|
|
|
finder => "$name/Manifest::Read/:InstallModules", |
547
|
|
|
|
|
|
|
# REQUIRE: Dist::Zilla::Plugin::Manifest::Read v0.4.0 # want `/:InstallModules`. |
548
|
|
|
|
|
|
|
is_strict => 0, # Strict version test fails in trial releases. |
549
|
|
|
|
|
|
|
} ], |
550
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
# I would like to set `Test::Version`'s `is_strict` option to `1`, but it will fail for |
552
|
|
|
|
|
|
|
# trial releases. To avoid that let's do a trick: set `is_strict` to `1` only in case of |
553
|
|
|
|
|
|
|
# non-trial release. |
554
|
|
|
|
|
|
|
[ 'Hook::BeforeBuild' => 'hack Test::Version' => { |
555
|
|
|
|
|
|
|
'hook' => [ q{ |
556
|
|
|
|
|
|
|
my $tv = $zilla->plugin_named( '} . $name . q{/Test::Version' ); |
557
|
|
|
|
|
|
|
$tv->{ is_strict } = $dist->is_trial ? '0' : '1'; |
558
|
|
|
|
|
|
|
} ], |
559
|
|
|
|
|
|
|
} ], |
560
|
|
|
|
|
|
|
|
561
|
|
|
|
|
|
|
[ 'Test::NewVersion' ], # This is not a version already uploaded to CPAN. |
562
|
|
|
|
|
|
|
|
563
|
|
|
|
|
|
|
[ 'Test::MinimumVersion' => { |
564
|
|
|
|
|
|
|
'max_target_perl' => $self->minimum_perl, |
565
|
|
|
|
|
|
|
} ], |
566
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
[ 'Test::Fixme' ], |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
[ 'Test::Perl::Critic' => { |
570
|
|
|
|
|
|
|
'critic_config' => 'xt/perlcritic.ini', |
571
|
|
|
|
|
|
|
# The test does not check tests. TODO: How to fix? |
572
|
|
|
|
|
|
|
} ], |
573
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
# POD |
575
|
|
|
|
|
|
|
|
576
|
|
|
|
|
|
|
[ 'PodSyntaxTests' ], # `Dist-Zilla`-bundled test, uses `Test::Pod`. |
577
|
|
|
|
|
|
|
|
578
|
|
|
|
|
|
|
[ 'PodCoverageTests' ], # `Dist-Zilla`-bundled test, uses `Pod::Coverage::TrustPod`. |
579
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
$self->spellchecker ? ( |
581
|
|
|
|
|
|
|
[ 'Test::PodSpelling' => { |
582
|
|
|
|
|
|
|
'spell_cmd' => $self->spellchecker, |
583
|
|
|
|
|
|
|
} ], |
584
|
|
|
|
|
|
|
) : ( |
585
|
|
|
|
|
|
|
), |
586
|
|
|
|
|
|
|
|
587
|
|
|
|
|
|
|
[ 'Test::Pod::LinkCheck' ], |
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
[ 'Test::Pod::No404s' ], # No dead URLs. |
590
|
|
|
|
|
|
|
|
591
|
|
|
|
|
|
|
[ 'Test::Synopsis' ], |
592
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
# Metadata |
594
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
[ 'MetaTests' ], # `Dist-Zilla`-bundled test, uses `Test::CPAN::Meta`, checks `META.yml`. |
596
|
|
|
|
|
|
|
|
597
|
|
|
|
|
|
|
[ 'Test::CPAN::Meta::JSON' ], # Uses `Test::CPAN::Meta::JSON`. |
598
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
[ 'Test::CPAN::Changes' ], |
600
|
|
|
|
|
|
|
# Does not check that `Changes` has a record for current version, see |
601
|
|
|
|
|
|
|
# <https://github.com/doherty/Dist-Zilla-Plugin-Test-CPAN-Changes/issues/6>. |
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
[ 'Test::DistManifest' ], |
604
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
# Overall |
606
|
|
|
|
|
|
|
|
607
|
|
|
|
|
|
|
[ 'Test::Kwalitee' ], |
608
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
# |
610
|
|
|
|
|
|
|
# Metainfo |
611
|
|
|
|
|
|
|
# |
612
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
[ 'MinimumPerl' ], |
614
|
|
|
|
|
|
|
|
615
|
|
|
|
|
|
|
[ 'AutoPrereqs' => { |
616
|
|
|
|
|
|
|
'extra_scanners' => 'Hint', # REQUIRE: Perl::PrereqScanner::Scanner::Hint |
617
|
|
|
|
|
|
|
} ], |
618
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
# `Prereqs::AuthorDeps` has a problem: |
620
|
|
|
|
|
|
|
# <https://github.com/dagolden/Dist-Zilla-Plugin-Prereqs-AuthorDeps/issues/1> |
621
|
|
|
|
|
|
|
# It adds local plugins (e. g. tools::GenerateHooks) to the dependencies, |
622
|
|
|
|
|
|
|
# which obviously are not indexed on CPAN. |
623
|
|
|
|
|
|
|
[ 'Prereqs::AuthorDeps' => { |
624
|
|
|
|
|
|
|
#~ 'exclude' => [ |
625
|
|
|
|
|
|
|
#~ # Exclude option requires a list of specific files, while I want to ignore all |
626
|
|
|
|
|
|
|
#~ # files in specific directory. |
627
|
|
|
|
|
|
|
#~ ], |
628
|
|
|
|
|
|
|
} ], |
629
|
|
|
|
|
|
|
|
630
|
|
|
|
|
|
|
# TODO: Remove when possible. |
631
|
|
|
|
|
|
|
# This is a dirty hack. Remove it when `Prereqs::AuthorDeps` allows me to ignore all the |
632
|
|
|
|
|
|
|
# modules from `tools/` directory. Meanwhile, find and remove all the dependencies on |
633
|
|
|
|
|
|
|
# modules with `tools::` prefix. |
634
|
|
|
|
|
|
|
[ 'Hook::PrereqSource' => 'tools' => { |
635
|
|
|
|
|
|
|
'hook' => [ q{ |
636
|
|
|
|
|
|
|
MY::prereqs( $self, sub { |
637
|
|
|
|
|
|
|
my ( $self, $module, $phase, $type, $reqs ) = @_; |
638
|
|
|
|
|
|
|
if ( $module =~ m{^tools::} ) { |
639
|
|
|
|
|
|
|
$self->log_debug( [ |
640
|
|
|
|
|
|
|
'found dependency on module %s (phase %s, type %s), deleting it', |
641
|
|
|
|
|
|
|
$module, $phase, $type |
642
|
|
|
|
|
|
|
] ); |
643
|
|
|
|
|
|
|
delete( $reqs->{ requirements }->{ $module } ); |
644
|
|
|
|
|
|
|
}; |
645
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
} ); |
647
|
|
|
|
|
|
|
} ], |
648
|
|
|
|
|
|
|
} ], |
649
|
|
|
|
|
|
|
|
650
|
|
|
|
|
|
|
# `use autodie ':all';` implicitly requires `IPC::System::Simple` module, but this |
651
|
|
|
|
|
|
|
# dependency is not detected by `AutoPrereqs`. If there is dependency on `autodie`, let |
652
|
|
|
|
|
|
|
# us add dependency on `IPC::System::Simple`. |
653
|
|
|
|
|
|
|
[ 'Hook::PrereqSource' => 'autodie' => { |
654
|
|
|
|
|
|
|
'hook' => [ q{ |
655
|
|
|
|
|
|
|
MY::prereqs( $self, sub { |
656
|
|
|
|
|
|
|
my ( $self, $module, $phase, $type ) = @_; |
657
|
|
|
|
|
|
|
if ( $module eq 'autodie' ) { |
658
|
|
|
|
|
|
|
$self->log_debug( [ |
659
|
|
|
|
|
|
|
'found dependency on module %s (phase %s, type %s), ' . |
660
|
|
|
|
|
|
|
'adding dependency on IPC::System::Simple', |
661
|
|
|
|
|
|
|
$module, $phase, $type |
662
|
|
|
|
|
|
|
] ); |
663
|
|
|
|
|
|
|
$dist->register_prereqs( |
664
|
|
|
|
|
|
|
{ phase => $phase, type => $type }, |
665
|
|
|
|
|
|
|
'IPC::System::Simple' => 0, |
666
|
|
|
|
|
|
|
); |
667
|
|
|
|
|
|
|
}; |
668
|
|
|
|
|
|
|
} ); |
669
|
|
|
|
|
|
|
} ], |
670
|
|
|
|
|
|
|
} ], |
671
|
|
|
|
|
|
|
|
672
|
|
|
|
|
|
|
[ 'CheckPrereqsIndexed' ], # Make sure all prereqs are published in CPAN. |
673
|
|
|
|
|
|
|
|
674
|
|
|
|
|
|
|
[ 'MetaProvides::Package' ], |
675
|
|
|
|
|
|
|
|
676
|
|
|
|
|
|
|
[ 'MetaResources::Template' => { |
677
|
|
|
|
|
|
|
'delimiters' => '{ }', |
678
|
|
|
|
|
|
|
'homepage' => '{$MY::metacpan}', |
679
|
|
|
|
|
|
|
'license' => '{$dist->license->url}', |
680
|
|
|
|
|
|
|
'repository.type' => '{$MY::repo_type}', |
681
|
|
|
|
|
|
|
'repository.url' => '{$MY::repo_url}', |
682
|
|
|
|
|
|
|
'repository.web' => '{$MY::repo_web}', |
683
|
|
|
|
|
|
|
'bugtracker.mailto' => '{$MY::cpan_rt_mailto}', |
684
|
|
|
|
|
|
|
'bugtracker.web' => '{$MY::cpan_rt_browse}', |
685
|
|
|
|
|
|
|
} ], |
686
|
|
|
|
|
|
|
|
687
|
|
|
|
|
|
|
[ 'MetaYAML' ], # Generate `META.yml`. |
688
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
[ 'MetaJSON' ], # Generate `META.json`. |
690
|
|
|
|
|
|
|
|
691
|
|
|
|
|
|
|
# |
692
|
|
|
|
|
|
|
# Installer |
693
|
|
|
|
|
|
|
# |
694
|
|
|
|
|
|
|
|
695
|
|
|
|
|
|
|
$self->installer ? ( |
696
|
|
|
|
|
|
|
[ $self->installer ], |
697
|
|
|
|
|
|
|
) : ( |
698
|
|
|
|
|
|
|
), |
699
|
|
|
|
|
|
|
|
700
|
|
|
|
|
|
|
# |
701
|
|
|
|
|
|
|
# Release |
702
|
|
|
|
|
|
|
# |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
$self->archive ? ( |
705
|
|
|
|
|
|
|
# Make sure archive directory exists. Do it in the very beginnig of release because |
706
|
|
|
|
|
|
|
# it is simple and fast operation. It will be annoying to pass all the tests and |
707
|
|
|
|
|
|
|
# stop release because `dzil` fails to create archive directory. |
708
|
|
|
|
|
|
|
[ 'Hook::BeforeRelease' => 'archive directory' => { |
709
|
|
|
|
|
|
|
'hook' => [ q{ |
710
|
|
|
|
|
|
|
my $root = path( $self->zilla->root . '' ); |
711
|
|
|
|
|
|
|
my $dir = path( "} . $self->archive . q{" ); |
712
|
|
|
|
|
|
|
if ( $dir->is_absolute ) { |
713
|
|
|
|
|
|
|
$self->log_error( [ 'bad archive directory: %s', "$dir" ] ); |
714
|
|
|
|
|
|
|
$self->log_error( [ 'absolute path not allowed' ] ); |
715
|
|
|
|
|
|
|
$self->abort(); |
716
|
|
|
|
|
|
|
}; |
717
|
|
|
|
|
|
|
if ( not $dir->is_dir ) { |
718
|
|
|
|
|
|
|
$self->log( [ 'creating archive directory %s', "$dir" ] ); |
719
|
|
|
|
|
|
|
$dir->mkpath(); |
720
|
|
|
|
|
|
|
}; |
721
|
|
|
|
|
|
|
} ], |
722
|
|
|
|
|
|
|
} ] |
723
|
|
|
|
|
|
|
) : ( |
724
|
|
|
|
|
|
|
), |
725
|
|
|
|
|
|
|
|
726
|
|
|
|
|
|
|
#~ [ 'RunExtraTests' ], # Does not work for me, see <https://github.com/dagolden/Dist-Zilla-Plugin-CheckExtraTests/issues/26>. |
727
|
|
|
|
|
|
|
[ 'CheckExtraTests' ], # So use CheckExtraTest meanwhile. |
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
[ 'TestRelease' ], # Unpack tarball and run tests. |
730
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
# Make sure the distro does not depend on unwanted modules. Unwanted module, for example, |
732
|
|
|
|
|
|
|
# is `Data::Printer`. I use it often for debugging purposes and forget to remove |
733
|
|
|
|
|
|
|
# debugging code. |
734
|
|
|
|
|
|
|
[ 'Hook::BeforeRelease' => 'unwanted deps' => { |
735
|
|
|
|
|
|
|
'hook' => [ q{ |
736
|
|
|
|
|
|
|
my @unwanted = (} . $self->_quote( $self->unwanted_modules ) . q{); |
737
|
|
|
|
|
|
|
my %unwanted = map( { $_ => 1 } @unwanted ); |
738
|
|
|
|
|
|
|
my $heading = 'unwanted modules found:'; |
739
|
|
|
|
|
|
|
MY::prereqs( $self, sub { |
740
|
|
|
|
|
|
|
my ( $self, $module, $phase, $type ) = @_; |
741
|
|
|
|
|
|
|
if ( $unwanted{ $module } ) { |
742
|
|
|
|
|
|
|
if ( $heading ) { |
743
|
|
|
|
|
|
|
$self->log_error( $heading ); |
744
|
|
|
|
|
|
|
$heading = undef; |
745
|
|
|
|
|
|
|
}; |
746
|
|
|
|
|
|
|
$self->log_error( [ |
747
|
|
|
|
|
|
|
' %s (phase %s, type %s)', $module, $phase, $type |
748
|
|
|
|
|
|
|
] ); |
749
|
|
|
|
|
|
|
}; |
750
|
|
|
|
|
|
|
} ); |
751
|
|
|
|
|
|
|
$self->abort_if_error(); |
752
|
|
|
|
|
|
|
} ], |
753
|
|
|
|
|
|
|
} ], |
754
|
|
|
|
|
|
|
|
755
|
|
|
|
|
|
|
[ 'CheckChangesHasContent' ], |
756
|
|
|
|
|
|
|
|
757
|
|
|
|
|
|
|
$self->spellchecker ? ( |
758
|
|
|
|
|
|
|
[ 'Hook::BeforeRelease' => 'spellcheck changes' => { |
759
|
|
|
|
|
|
|
'hook' => [ q{ |
760
|
|
|
|
|
|
|
$self->log( 'spellchecking Changes' ); |
761
|
|
|
|
|
|
|
use File::chdir; |
762
|
|
|
|
|
|
|
local $CWD = $zilla->built_in . ''; |
763
|
|
|
|
|
|
|
# |
764
|
|
|
|
|
|
|
# Run spellchecker, collect list of unknown words. |
765
|
|
|
|
|
|
|
# |
766
|
|
|
|
|
|
|
use IPC::Run3; |
767
|
|
|
|
|
|
|
my @list; |
768
|
|
|
|
|
|
|
run3( '} . $self->spellchecker . q{', 'Changes', \@list ); |
769
|
|
|
|
|
|
|
if ( $? > 0 ) { |
770
|
|
|
|
|
|
|
$self->abort(); |
771
|
|
|
|
|
|
|
}; |
772
|
|
|
|
|
|
|
chomp( @list ); |
773
|
|
|
|
|
|
|
# |
774
|
|
|
|
|
|
|
# Steal list of words to ignore from `PodSpelling` plugin. |
775
|
|
|
|
|
|
|
# |
776
|
|
|
|
|
|
|
my $podspelling = $zilla->plugin_named( '} . $name . q{/Test::PodSpelling' ); |
777
|
|
|
|
|
|
|
my %ignore = map( { $_ => 1 } @{ $podspelling->stopwords } ); |
778
|
|
|
|
|
|
|
# |
779
|
|
|
|
|
|
|
# Add all module names. |
780
|
|
|
|
|
|
|
# |
781
|
|
|
|
|
|
|
my $prereqs = $dist->prereqs->cpan_meta_prereqs; |
782
|
|
|
|
|
|
|
for my $phase ( $prereqs->__legal_phases ) { |
783
|
|
|
|
|
|
|
for my $type ( $prereqs->__legal_types ) { |
784
|
|
|
|
|
|
|
my $reqs = $prereqs->requirements_for( $phase, $type ) or next; |
785
|
|
|
|
|
|
|
for my $module ( keys( %{ $reqs->{ requirements } } ) ) { |
786
|
|
|
|
|
|
|
$ignore{ $_ } = 1 for split( '::', $module ); |
787
|
|
|
|
|
|
|
}; |
788
|
|
|
|
|
|
|
}; |
789
|
|
|
|
|
|
|
}; |
790
|
|
|
|
|
|
|
# |
791
|
|
|
|
|
|
|
# Build maps: word => count and count => word. |
792
|
|
|
|
|
|
|
# |
793
|
|
|
|
|
|
|
my %w2c; # word => count |
794
|
|
|
|
|
|
|
$w2c{ $_ } += 1 for grep( { not $ignore{ $_ } and not $ignore{ lc( $_ ) } } @list ); |
795
|
|
|
|
|
|
|
my %c2w; # count => word |
796
|
|
|
|
|
|
|
push( @{ $c2w{ $w2c{ $_ } } }, $_ ) for keys( %w2c ); |
797
|
|
|
|
|
|
|
# |
798
|
|
|
|
|
|
|
# Now print the list of spelling errors. |
799
|
|
|
|
|
|
|
# |
800
|
|
|
|
|
|
|
for my $count ( sort( { $b <=> $a } keys( %c2w ) ) ) { |
801
|
|
|
|
|
|
|
printf( "%2d: %s\n", $count, join( ', ', sort( @{ $c2w{ $count } } ) ) ); |
802
|
|
|
|
|
|
|
}; |
803
|
|
|
|
|
|
|
if ( %w2c ) { |
804
|
|
|
|
|
|
|
$self->abort( 'spelling errors found in Changes' ); |
805
|
|
|
|
|
|
|
}; |
806
|
|
|
|
|
|
|
} ], |
807
|
|
|
|
|
|
|
} ], |
808
|
|
|
|
|
|
|
) : ( |
809
|
|
|
|
|
|
|
), |
810
|
|
|
|
|
|
|
|
811
|
|
|
|
|
|
|
[ 'Author::VDB::Hg::Tag::Check', ], |
812
|
|
|
|
|
|
|
|
813
|
|
|
|
|
|
|
[ 'Author::VDB::Hg::Status', ], |
814
|
|
|
|
|
|
|
|
815
|
|
|
|
|
|
|
$self->local_release ? ( |
816
|
|
|
|
|
|
|
[ 'Hook::BeforeRelease' => 'release note' => { |
817
|
|
|
|
|
|
|
'hook' => [ q{ |
818
|
|
|
|
|
|
|
$self->log( '*** Preparing to *local* release ***' ); |
819
|
|
|
|
|
|
|
} ], |
820
|
|
|
|
|
|
|
} ], |
821
|
|
|
|
|
|
|
) : ( |
822
|
|
|
|
|
|
|
), |
823
|
|
|
|
|
|
|
[ 'ConfirmRelease' ], # Ask confirmation before uploading the release. |
824
|
|
|
|
|
|
|
|
825
|
|
|
|
|
|
|
[ 'Hook::Releaser' => 'tgz' => { |
826
|
|
|
|
|
|
|
'hook' => [ q{ |
827
|
|
|
|
|
|
|
$MY::tgz = $arg; |
828
|
|
|
|
|
|
|
} ], |
829
|
|
|
|
|
|
|
} ], |
830
|
|
|
|
|
|
|
|
831
|
|
|
|
|
|
|
# `Archive` is a good plugin, but I need to copy, not move tarball, because I want to |
832
|
|
|
|
|
|
|
# archive the tarball first, and then upload it to CPAN. |
833
|
|
|
|
|
|
|
$self->archive ? ( |
834
|
|
|
|
|
|
|
[ 'Hook::Releaser' => 'archive release' => { |
835
|
|
|
|
|
|
|
'hook' => [ q{ |
836
|
|
|
|
|
|
|
use Path::Tiny; |
837
|
|
|
|
|
|
|
my $tgz = path( $arg ); |
838
|
|
|
|
|
|
|
my $dir = path( "} . $self->archive . q{" ); |
839
|
|
|
|
|
|
|
$self->log( [ 'copying %s to %s', "$tgz", "$dir" ] ); |
840
|
|
|
|
|
|
|
$tgz->copy( $dir->child( $tgz->basename ) ); |
841
|
|
|
|
|
|
|
} ], |
842
|
|
|
|
|
|
|
} ], |
843
|
|
|
|
|
|
|
) : ( |
844
|
|
|
|
|
|
|
), |
845
|
|
|
|
|
|
|
|
846
|
|
|
|
|
|
|
$self->local_release ? ( |
847
|
|
|
|
|
|
|
# No need in `FakeRelease`: we have at least one releaser, it is enough. |
848
|
|
|
|
|
|
|
) : ( |
849
|
|
|
|
|
|
|
[ 'UploadToCPAN' ], |
850
|
|
|
|
|
|
|
), |
851
|
|
|
|
|
|
|
|
852
|
|
|
|
|
|
|
[ 'Author::VDB::Hg::Tag::Add', ], |
853
|
|
|
|
|
|
|
|
854
|
|
|
|
|
|
|
[ 'NextRelease' => { |
855
|
|
|
|
|
|
|
'format' => '%V @ %{yyyy-MM-dd HH:mm zzz}d', |
856
|
|
|
|
|
|
|
'time_zone' => 'UTC', |
857
|
|
|
|
|
|
|
} ], |
858
|
|
|
|
|
|
|
|
859
|
|
|
|
|
|
|
[ 'Author::VDB::Version::Bump', ], |
860
|
|
|
|
|
|
|
|
861
|
|
|
|
|
|
|
[ 'Author::VDB::Hg::Commit', { |
862
|
|
|
|
|
|
|
'files' => [ |
863
|
|
|
|
|
|
|
'.hgtags', # Changed by `Hg::Tag::Add`. |
864
|
|
|
|
|
|
|
'Changes', # Changed by `NextRelease`. |
865
|
|
|
|
|
|
|
'VERSION', # Changed by `Version::Bump`. |
866
|
|
|
|
|
|
|
], |
867
|
|
|
|
|
|
|
} ], |
868
|
|
|
|
|
|
|
|
869
|
|
|
|
|
|
|
$self->local_release ? ( |
870
|
|
|
|
|
|
|
) : ( |
871
|
|
|
|
|
|
|
[ 'Author::VDB::Hg::Push', { |
872
|
|
|
|
|
|
|
repository => $self->repository, |
873
|
|
|
|
|
|
|
} ], |
874
|
|
|
|
|
|
|
), |
875
|
|
|
|
|
|
|
|
876
|
|
|
|
|
|
|
[ 'Hook::AfterRelease' => 'install' => { |
877
|
|
|
|
|
|
|
'hook' => [ q{ |
878
|
|
|
|
|
|
|
use autodie ':all'; |
879
|
|
|
|
|
|
|
use File::chdir; |
880
|
|
|
|
|
|
|
$self->log( [ 'installing %s-%s', $dist->name, $dist->version ] ); |
881
|
|
|
|
|
|
|
local $CWD = $zilla->built_in; |
882
|
|
|
|
|
|
|
system( 'cpanm', '--notest', '.' ); |
883
|
|
|
|
|
|
|
# ^ We run the tests on unpacked tarball before release, no need in running |
884
|
|
|
|
|
|
|
# tests one more time. |
885
|
|
|
|
|
|
|
} ], |
886
|
|
|
|
|
|
|
} ], |
887
|
|
|
|
|
|
|
|
888
|
|
|
|
|
|
|
[ 'Hook::AfterRelease' => 'clean' => { |
889
|
|
|
|
|
|
|
'hook' => [ q{ |
890
|
|
|
|
|
|
|
$zilla->clean(); |
891
|
|
|
|
|
|
|
} ], |
892
|
|
|
|
|
|
|
} ], |
893
|
|
|
|
|
|
|
|
894
|
|
|
|
|
|
|
); |
895
|
|
|
|
|
|
|
|
896
|
7
|
|
|
|
|
10561
|
return; |
897
|
|
|
|
|
|
|
|
898
|
|
|
|
|
|
|
}; |
899
|
|
|
|
|
|
|
|
900
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
901
|
|
|
|
|
|
|
|
902
|
|
|
|
|
|
|
1; |
903
|
|
|
|
|
|
|
|
904
|
|
|
|
|
|
|
#pod =head1 COPYRIGHT AND LICENSE |
905
|
|
|
|
|
|
|
#pod |
906
|
|
|
|
|
|
|
#pod Copyright (C) 2015 Van de Bugger |
907
|
|
|
|
|
|
|
#pod |
908
|
|
|
|
|
|
|
#pod License GPLv3+: The GNU General Public License version 3 or later |
909
|
|
|
|
|
|
|
#pod <http://www.gnu.org/licenses/gpl-3.0.txt>. |
910
|
|
|
|
|
|
|
#pod |
911
|
|
|
|
|
|
|
#pod This is free software: you are free to change and redistribute it. There is |
912
|
|
|
|
|
|
|
#pod NO WARRANTY, to the extent permitted by law. |
913
|
|
|
|
|
|
|
#pod |
914
|
|
|
|
|
|
|
#pod |
915
|
|
|
|
|
|
|
#pod =cut |
916
|
|
|
|
|
|
|
|
917
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------------------------ |
918
|
|
|
|
|
|
|
# |
919
|
|
|
|
|
|
|
# file: doc/what.pod |
920
|
|
|
|
|
|
|
# |
921
|
|
|
|
|
|
|
# This file is part of perl-Dist-Zilla-PluginBundle-Author-VDB. |
922
|
|
|
|
|
|
|
# |
923
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------------------------ |
924
|
|
|
|
|
|
|
|
925
|
|
|
|
|
|
|
#pod =encoding UTF-8 |
926
|
|
|
|
|
|
|
#pod |
927
|
|
|
|
|
|
|
#pod =head1 WHAT? |
928
|
|
|
|
|
|
|
#pod |
929
|
|
|
|
|
|
|
#pod C<Dist-Zilla-PluginBundle-Author-VDB> (or just C<@Author::VDB>) is a C<Dist-Zilla> plugin bundle used by VDB. |
930
|
|
|
|
|
|
|
#pod |
931
|
|
|
|
|
|
|
#pod =cut |
932
|
|
|
|
|
|
|
|
933
|
|
|
|
|
|
|
# end of file # |
934
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------------------------ |
935
|
|
|
|
|
|
|
# |
936
|
|
|
|
|
|
|
# doc/why.pod |
937
|
|
|
|
|
|
|
# |
938
|
|
|
|
|
|
|
# This file is part of perl-Dist-Zilla-PluginBundle-Author-VDB. |
939
|
|
|
|
|
|
|
# |
940
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------------------------ |
941
|
|
|
|
|
|
|
|
942
|
|
|
|
|
|
|
#pod =encoding UTF-8 |
943
|
|
|
|
|
|
|
#pod |
944
|
|
|
|
|
|
|
#pod =head1 WHY? |
945
|
|
|
|
|
|
|
#pod |
946
|
|
|
|
|
|
|
#pod I have published few distributions on CPAN. Every distribution have F<dist.ini> file. All the |
947
|
|
|
|
|
|
|
#pod F<dist.ini> files are very similar. Maintaining multiple very similar F<dist.ini> files is boring. |
948
|
|
|
|
|
|
|
#pod Plugin bundle solves the problem. |
949
|
|
|
|
|
|
|
#pod |
950
|
|
|
|
|
|
|
#pod =cut |
951
|
|
|
|
|
|
|
|
952
|
|
|
|
|
|
|
# end of file # |
953
|
|
|
|
|
|
|
|
954
|
|
|
|
|
|
|
=pod |
955
|
|
|
|
|
|
|
|
956
|
|
|
|
|
|
|
=encoding UTF-8 |
957
|
|
|
|
|
|
|
|
958
|
|
|
|
|
|
|
=head1 NAME |
959
|
|
|
|
|
|
|
|
960
|
|
|
|
|
|
|
Dist::Zilla::PluginBundle::Author::VDB - VDB's plugin bundle |
961
|
|
|
|
|
|
|
|
962
|
|
|
|
|
|
|
=head1 VERSION |
963
|
|
|
|
|
|
|
|
964
|
|
|
|
|
|
|
Version v0.11.2_04, released on 2016-12-06 20:27 UTC. |
965
|
|
|
|
|
|
|
This is a B<trial release>. |
966
|
|
|
|
|
|
|
|
967
|
|
|
|
|
|
|
=head1 WHAT? |
968
|
|
|
|
|
|
|
|
969
|
|
|
|
|
|
|
C<Dist-Zilla-PluginBundle-Author-VDB> (or just C<@Author::VDB>) is a C<Dist-Zilla> plugin bundle used by VDB. |
970
|
|
|
|
|
|
|
|
971
|
|
|
|
|
|
|
=head1 DESCRIPTION |
972
|
|
|
|
|
|
|
|
973
|
|
|
|
|
|
|
It is unlikely that someone else will want to use it, so I will not bother with documenting it, at |
974
|
|
|
|
|
|
|
least for now. |
975
|
|
|
|
|
|
|
|
976
|
|
|
|
|
|
|
=head1 OBJECT METHODS |
977
|
|
|
|
|
|
|
|
978
|
|
|
|
|
|
|
=head2 mvp_multivalue_args |
979
|
|
|
|
|
|
|
|
980
|
|
|
|
|
|
|
=head2 _quote |
981
|
|
|
|
|
|
|
|
982
|
|
|
|
|
|
|
Convert an attribute to a form suitable for using in source. C<Str> attribute is converted into a |
983
|
|
|
|
|
|
|
string literal, C<ArrayRef> attribute is converted to a list of string literals. |
984
|
|
|
|
|
|
|
|
985
|
|
|
|
|
|
|
=head1 OPTIONS |
986
|
|
|
|
|
|
|
|
987
|
|
|
|
|
|
|
=head2 minimum_perl |
988
|
|
|
|
|
|
|
|
989
|
|
|
|
|
|
|
Optional, default value C<5.006>. |
990
|
|
|
|
|
|
|
|
991
|
|
|
|
|
|
|
=head2 copying |
992
|
|
|
|
|
|
|
|
993
|
|
|
|
|
|
|
Name of POD file to generate distribution F<COPYING> text file. Empty value disables generation |
994
|
|
|
|
|
|
|
F<COPYING> file. |
995
|
|
|
|
|
|
|
|
996
|
|
|
|
|
|
|
C<Str>, optional, default value C<doc/copying.pod>. |
997
|
|
|
|
|
|
|
|
998
|
|
|
|
|
|
|
=head2 readme |
999
|
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
Names of POD files to generate distribution F<README> text file. This is a multi-value option. |
1001
|
|
|
|
|
|
|
Empty values are ignored. Empty list disables generating F<README> file. |
1002
|
|
|
|
|
|
|
|
1003
|
|
|
|
|
|
|
C<ArrayRef[Str]>, optional, default value C<[ 'doc/what.pod', 'doc/why.pod', 'doc/naming.pod', 'doc/forms.pod', 'doc/source.pod', 'doc/distribution.pod', 'doc/installing.pod', 'doc/hacking.pod', 'doc/documentation.pod', 'doc/feedback.pod', 'doc/glossary.pod' ]>. |
1004
|
|
|
|
|
|
|
|
1005
|
|
|
|
|
|
|
=head2 local_release |
1006
|
|
|
|
|
|
|
|
1007
|
|
|
|
|
|
|
If true, release will be a local one, i. e. no external operations will be done: C<UploadToCPAN> |
1008
|
|
|
|
|
|
|
and C<hg push> will be skipped, <hg tag> will create a local tag. |
1009
|
|
|
|
|
|
|
|
1010
|
|
|
|
|
|
|
Option can be set trough F<dist.ini> file or with C<DZIL_LOCAL_RELEASE> environment variable. |
1011
|
|
|
|
|
|
|
|
1012
|
|
|
|
|
|
|
Optional, default value is 0. |
1013
|
|
|
|
|
|
|
|
1014
|
|
|
|
|
|
|
=head2 archive |
1015
|
|
|
|
|
|
|
|
1016
|
|
|
|
|
|
|
Directory to archive files to. If empty, release will not be archived. If such directory does not |
1017
|
|
|
|
|
|
|
exist, it will be created before release. |
1018
|
|
|
|
|
|
|
|
1019
|
|
|
|
|
|
|
Optional, default value C<".releases">. |
1020
|
|
|
|
|
|
|
|
1021
|
|
|
|
|
|
|
=head2 templates |
1022
|
|
|
|
|
|
|
|
1023
|
|
|
|
|
|
|
This option will be passed to C<Templates> plugin. If you no not want C<Templates> to process |
1024
|
|
|
|
|
|
|
files, specify C<:NoFiles>. This is multi-value option (i. e. may be specified several times). |
1025
|
|
|
|
|
|
|
|
1026
|
|
|
|
|
|
|
Optional, default value C<[ ':InstallModules' ]>. |
1027
|
|
|
|
|
|
|
|
1028
|
|
|
|
|
|
|
=head2 unwanted_module |
1029
|
|
|
|
|
|
|
|
1030
|
|
|
|
|
|
|
=head2 unwanted_modules |
1031
|
|
|
|
|
|
|
|
1032
|
|
|
|
|
|
|
TODO C<[ qw{ DDP Data::Printer } ]>. |
1033
|
|
|
|
|
|
|
|
1034
|
|
|
|
|
|
|
=head2 spellchecker |
1035
|
|
|
|
|
|
|
|
1036
|
|
|
|
|
|
|
Command to run spellchecker. Spellchecker command is expected to read text from stdin, and print to |
1037
|
|
|
|
|
|
|
stdout misspelled words. If empty, spellchecking will be skipped. This involve C<Test::PodSpelling> |
1038
|
|
|
|
|
|
|
plugin and internally implemented checking the F<Changes> file. |
1039
|
|
|
|
|
|
|
|
1040
|
|
|
|
|
|
|
Optional, default value C<aspell list -l en -p ./xt/aspell-en.pws>. |
1041
|
|
|
|
|
|
|
|
1042
|
|
|
|
|
|
|
=head2 repository |
1043
|
|
|
|
|
|
|
|
1044
|
|
|
|
|
|
|
Mercurial repository to push changes after release to. Option may be specified multiple times to |
1045
|
|
|
|
|
|
|
push changes into several repositories. By default changes are pushed to one repository C<default>. |
1046
|
|
|
|
|
|
|
|
1047
|
|
|
|
|
|
|
=head2 installer |
1048
|
|
|
|
|
|
|
|
1049
|
|
|
|
|
|
|
TODO |
1050
|
|
|
|
|
|
|
|
1051
|
|
|
|
|
|
|
=head1 WHY? |
1052
|
|
|
|
|
|
|
|
1053
|
|
|
|
|
|
|
I have published few distributions on CPAN. Every distribution have F<dist.ini> file. All the |
1054
|
|
|
|
|
|
|
F<dist.ini> files are very similar. Maintaining multiple very similar F<dist.ini> files is boring. |
1055
|
|
|
|
|
|
|
Plugin bundle solves the problem. |
1056
|
|
|
|
|
|
|
|
1057
|
|
|
|
|
|
|
=for Pod::Coverage configure |
1058
|
|
|
|
|
|
|
|
1059
|
|
|
|
|
|
|
=head1 AUTHOR |
1060
|
|
|
|
|
|
|
|
1061
|
|
|
|
|
|
|
Van de Bugger <van.de.bugger@gmail.com> |
1062
|
|
|
|
|
|
|
|
1063
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
1064
|
|
|
|
|
|
|
|
1065
|
|
|
|
|
|
|
Copyright (C) 2015 Van de Bugger |
1066
|
|
|
|
|
|
|
|
1067
|
|
|
|
|
|
|
License GPLv3+: The GNU General Public License version 3 or later |
1068
|
|
|
|
|
|
|
<http://www.gnu.org/licenses/gpl-3.0.txt>. |
1069
|
|
|
|
|
|
|
|
1070
|
|
|
|
|
|
|
This is free software: you are free to change and redistribute it. There is |
1071
|
|
|
|
|
|
|
NO WARRANTY, to the extent permitted by law. |
1072
|
|
|
|
|
|
|
|
1073
|
|
|
|
|
|
|
=cut |
1074
|
|
|
|
|
|
|
|
1075
|
|
|
|
|
|
|
__DATA__ |
1076
|
|
|
|
|
|
|
|
1077
|
|
|
|
|
|
|
__[ not a real section, just a comment ]__ |
1078
|
|
|
|
|
|
|
|
1079
|
|
|
|
|
|
|
# `perldoc` interprets POD even after `__DATA__`, so module documentation will include all the |
1080
|
|
|
|
|
|
|
# sections below. To avoid this undesired behavour, prepend each POD directive with backslash â |
1081
|
|
|
|
|
|
|
# it will be stripped by `Data::Section`. |
1082
|
|
|
|
|
|
|
|
1083
|
|
|
|
|
|
|
__[ doc/copying.pod ]__ |
1084
|
|
|
|
|
|
|
|
1085
|
|
|
|
|
|
|
\=encoding UTF-8 |
1086
|
|
|
|
|
|
|
|
1087
|
|
|
|
|
|
|
\=head1 COPYRIGHT AND LICENSE |
1088
|
|
|
|
|
|
|
|
1089
|
|
|
|
|
|
|
{{$dist->license->notice();}} |
1090
|
|
|
|
|
|
|
|
1091
|
|
|
|
|
|
|
C<perl-{{$MY::name}}> I<distribution> may contain files generated by C<Dist-Zilla> and/or its |
1092
|
|
|
|
|
|
|
plugins from third-party templates; copyright and license specified above are I<not> applicable to |
1093
|
|
|
|
|
|
|
that files. |
1094
|
|
|
|
|
|
|
|
1095
|
|
|
|
|
|
|
\=cut |
1096
|
|
|
|
|
|
|
|
1097
|
|
|
|
|
|
|
__[ doc/distribution.pod ]__ |
1098
|
|
|
|
|
|
|
|
1099
|
|
|
|
|
|
|
\=encoding UTF-8 |
1100
|
|
|
|
|
|
|
|
1101
|
|
|
|
|
|
|
\=head1 DISTRIBUTION |
1102
|
|
|
|
|
|
|
|
1103
|
|
|
|
|
|
|
C<{{$MY::name}}> distributions are published on L<CPAN|{{$MY::metacpan}}>. |
1104
|
|
|
|
|
|
|
|
1105
|
|
|
|
|
|
|
\=head2 Generated Files |
1106
|
|
|
|
|
|
|
|
1107
|
|
|
|
|
|
|
Distribution may contain files preprocessed or generated by C<Dist-Zilla> and its plugins. Some |
1108
|
|
|
|
|
|
|
generated files are made from C<{{$MY::name}}> source, but some are generated from |
1109
|
|
|
|
|
|
|
third-party templates. Files generated from third-party templates usually include a comment near |
1110
|
|
|
|
|
|
|
the top of the file: |
1111
|
|
|
|
|
|
|
|
1112
|
|
|
|
|
|
|
This file was generated with NAME |
1113
|
|
|
|
|
|
|
|
1114
|
|
|
|
|
|
|
(where I<NAME> is a name of the plugin generated the file). Such files are I<not> part of |
1115
|
|
|
|
|
|
|
C<{{$MY::name}}> source, and C<{{$MY::name}}> copyright and license are not applicable |
1116
|
|
|
|
|
|
|
to such files. |
1117
|
|
|
|
|
|
|
|
1118
|
|
|
|
|
|
|
\=cut |
1119
|
|
|
|
|
|
|
|
1120
|
|
|
|
|
|
|
__[ doc/documentation.pod ]__ |
1121
|
|
|
|
|
|
|
|
1122
|
|
|
|
|
|
|
\=encoding UTF-8 |
1123
|
|
|
|
|
|
|
|
1124
|
|
|
|
|
|
|
\=head1 DOCUMENTATION |
1125
|
|
|
|
|
|
|
|
1126
|
|
|
|
|
|
|
\=head2 Online |
1127
|
|
|
|
|
|
|
|
1128
|
|
|
|
|
|
|
The easiest way is browsing the documentation L<online at meta::cpan|{{$MY::metacpan}}>. |
1129
|
|
|
|
|
|
|
|
1130
|
|
|
|
|
|
|
\=head2 Locally Installed |
1131
|
|
|
|
|
|
|
|
1132
|
|
|
|
|
|
|
If you have the distribution installed, use C<perldoc> tool to browse locally |
1133
|
|
|
|
|
|
|
installed documentation: |
1134
|
|
|
|
|
|
|
|
1135
|
|
|
|
|
|
|
$ perldoc {{$MY::package}}::Manual |
1136
|
|
|
|
|
|
|
$ perldoc {{$MY::package}} |
1137
|
|
|
|
|
|
|
|
1138
|
|
|
|
|
|
|
\=head2 Built from Source |
1139
|
|
|
|
|
|
|
|
1140
|
|
|
|
|
|
|
Build C<{{$MY::name}}> first (see L</"HACKING">), then: |
1141
|
|
|
|
|
|
|
|
1142
|
|
|
|
|
|
|
$ cd {{$MY::name}}-VERSION |
1143
|
|
|
|
|
|
|
$ perldoc {{$MY::package}}::Manual |
1144
|
|
|
|
|
|
|
$ perldoc {{$MY::package}} |
1145
|
|
|
|
|
|
|
|
1146
|
|
|
|
|
|
|
where I<VERSION> is a version of built distribution. |
1147
|
|
|
|
|
|
|
|
1148
|
|
|
|
|
|
|
\=cut |
1149
|
|
|
|
|
|
|
|
1150
|
|
|
|
|
|
|
__[ doc/feedback.pod ]__ |
1151
|
|
|
|
|
|
|
|
1152
|
|
|
|
|
|
|
\=encoding UTF-8 |
1153
|
|
|
|
|
|
|
|
1154
|
|
|
|
|
|
|
\=head1 FEEDBACK |
1155
|
|
|
|
|
|
|
|
1156
|
|
|
|
|
|
|
\=head2 CPAN Request Tracker |
1157
|
|
|
|
|
|
|
|
1158
|
|
|
|
|
|
|
The quickest way to report a bug in C<{{$MY::name}}> is by sending email to |
1159
|
|
|
|
|
|
|
bug-{{$MY::name}} [at] rt.cpan.org. |
1160
|
|
|
|
|
|
|
|
1161
|
|
|
|
|
|
|
CPAN request tracker can be used via web interface also: |
1162
|
|
|
|
|
|
|
|
1163
|
|
|
|
|
|
|
\=over |
1164
|
|
|
|
|
|
|
|
1165
|
|
|
|
|
|
|
\=item L<Browse bugs|{{$MY::cpan_rt_browse}}> |
1166
|
|
|
|
|
|
|
|
1167
|
|
|
|
|
|
|
Browsing bugs does not require authentication. |
1168
|
|
|
|
|
|
|
|
1169
|
|
|
|
|
|
|
\=item L<Report bugs|{{$MY::cpan_rt_report}}> |
1170
|
|
|
|
|
|
|
|
1171
|
|
|
|
|
|
|
You need to be a CPAN author, have a L<BitCard|https://www.bitcard.org/> account, or OpenID in |
1172
|
|
|
|
|
|
|
order to report bugs via the web interface. |
1173
|
|
|
|
|
|
|
|
1174
|
|
|
|
|
|
|
(On 2015-04-27 I have logged in successfully with my LiveJournal OpenID, but my Google OpenID did |
1175
|
|
|
|
|
|
|
not work for CPAN. I did not check other OpenID providers.) |
1176
|
|
|
|
|
|
|
|
1177
|
|
|
|
|
|
|
\=back |
1178
|
|
|
|
|
|
|
|
1179
|
|
|
|
|
|
|
\=head2 Send Email to Author |
1180
|
|
|
|
|
|
|
|
1181
|
|
|
|
|
|
|
As a last resort, send email to author: {{$MY::author}}. Please start message subject with |
1182
|
|
|
|
|
|
|
"perl-{{$MY::name}}:". |
1183
|
|
|
|
|
|
|
|
1184
|
|
|
|
|
|
|
\=cut |
1185
|
|
|
|
|
|
|
|
1186
|
|
|
|
|
|
|
__[ doc/forms.pod ]__ |
1187
|
|
|
|
|
|
|
|
1188
|
|
|
|
|
|
|
\=encoding UTF-8 |
1189
|
|
|
|
|
|
|
|
1190
|
|
|
|
|
|
|
\=head1 FORMS |
1191
|
|
|
|
|
|
|
|
1192
|
|
|
|
|
|
|
You may face C<{{$MY::name}}> in I<source> or I<distribution> forms. |
1193
|
|
|
|
|
|
|
|
1194
|
|
|
|
|
|
|
If you are going to {{$MY::abstract}}, you will likely be interested in I<using> |
1195
|
|
|
|
|
|
|
C<{{$MY::name}}> I<distribution>. If you are going to I<develop> (or I<hack>) the |
1196
|
|
|
|
|
|
|
C<{{$MY::name}}> itself, you will likely need the I<source>, not distribution. |
1197
|
|
|
|
|
|
|
|
1198
|
|
|
|
|
|
|
Since Perl is an interpreting language, modules in the distribution I<look> like sources. Actually, |
1199
|
|
|
|
|
|
|
they are Perl source files. But they are not I<actual> sources, because they are I<built> |
1200
|
|
|
|
|
|
|
(preprocessed or generated) by L<Dist-Zilla>. |
1201
|
|
|
|
|
|
|
|
1202
|
|
|
|
|
|
|
How to distinguish source and distribution: |
1203
|
|
|
|
|
|
|
|
1204
|
|
|
|
|
|
|
\=over |
1205
|
|
|
|
|
|
|
|
1206
|
|
|
|
|
|
|
\=item * |
1207
|
|
|
|
|
|
|
|
1208
|
|
|
|
|
|
|
Source may contain Mercurial files and directories F<.hgignore>, F<.hgtags>, F<.hg/>, while |
1209
|
|
|
|
|
|
|
distribution should not. |
1210
|
|
|
|
|
|
|
|
1211
|
|
|
|
|
|
|
\=item * |
1212
|
|
|
|
|
|
|
|
1213
|
|
|
|
|
|
|
Source should contain F<dist.ini> file, while distribution may not. |
1214
|
|
|
|
|
|
|
|
1215
|
|
|
|
|
|
|
\=item * |
1216
|
|
|
|
|
|
|
|
1217
|
|
|
|
|
|
|
Source should I<not> contain F<xt/> directory, while distribution should. |
1218
|
|
|
|
|
|
|
|
1219
|
|
|
|
|
|
|
\=item * |
1220
|
|
|
|
|
|
|
|
1221
|
|
|
|
|
|
|
Name of source directory does I<not> include version (e. g. C<{{$MY::name}}>), while name of |
1222
|
|
|
|
|
|
|
distribution does (e. g. C<{{$MY::name}}-v0.7.1>). |
1223
|
|
|
|
|
|
|
|
1224
|
|
|
|
|
|
|
\=back |
1225
|
|
|
|
|
|
|
|
1226
|
|
|
|
|
|
|
\=cut |
1227
|
|
|
|
|
|
|
|
1228
|
|
|
|
|
|
|
__[ doc/glossary.pod ]__ |
1229
|
|
|
|
|
|
|
|
1230
|
|
|
|
|
|
|
\=encoding UTF-8 |
1231
|
|
|
|
|
|
|
|
1232
|
|
|
|
|
|
|
\=head1 GLOSSARY |
1233
|
|
|
|
|
|
|
|
1234
|
|
|
|
|
|
|
\=over |
1235
|
|
|
|
|
|
|
|
1236
|
|
|
|
|
|
|
\=item CPAN |
1237
|
|
|
|
|
|
|
|
1238
|
|
|
|
|
|
|
Comprehensive Perl Archive Network, a B<large> collection of Perl software and documentation. See |
1239
|
|
|
|
|
|
|
L<cpan.org|http://www.cpan.org>, L<What is |
1240
|
|
|
|
|
|
|
CPAN?|http://www.cpan.org/misc/cpan-faq.html#What_is_CPAN>. |
1241
|
|
|
|
|
|
|
|
1242
|
|
|
|
|
|
|
\=item Distribution |
1243
|
|
|
|
|
|
|
|
1244
|
|
|
|
|
|
|
Tarball, containing Perl modules and accompanying files (documentation, metainfo, tests). Usually |
1245
|
|
|
|
|
|
|
distributions are uploaded to CPAN, and can be installed with dedicated tools (C<cpan>, C<cpanm>, |
1246
|
|
|
|
|
|
|
and others). |
1247
|
|
|
|
|
|
|
|
1248
|
|
|
|
|
|
|
\=item Module |
1249
|
|
|
|
|
|
|
|
1250
|
|
|
|
|
|
|
Perl library file, usually with C<.pm> suffix. Usually contains one package. See |
1251
|
|
|
|
|
|
|
L<perlmod|http://perldoc.perl.org/perlmod.html#Perl-Modules>. |
1252
|
|
|
|
|
|
|
|
1253
|
|
|
|
|
|
|
\=item Package |
1254
|
|
|
|
|
|
|
|
1255
|
|
|
|
|
|
|
Perl language construct. See L<package|http://perldoc.perl.org/functions/package.html> and |
1256
|
|
|
|
|
|
|
L<perlmod|http://perldoc.perl.org/perlmod.html#Packages>. |
1257
|
|
|
|
|
|
|
|
1258
|
|
|
|
|
|
|
\=back |
1259
|
|
|
|
|
|
|
|
1260
|
|
|
|
|
|
|
\=cut |
1261
|
|
|
|
|
|
|
|
1262
|
|
|
|
|
|
|
__[ doc/hacking.pod ]__ |
1263
|
|
|
|
|
|
|
|
1264
|
|
|
|
|
|
|
\=encoding UTF-8 |
1265
|
|
|
|
|
|
|
|
1266
|
|
|
|
|
|
|
\=head1 HACKING |
1267
|
|
|
|
|
|
|
|
1268
|
|
|
|
|
|
|
For hacking, you will need Mercurial, Perl interpreter and C<Dist-Zilla> (with some plugins), and |
1269
|
|
|
|
|
|
|
likely C<cpanm> to install missed parts. |
1270
|
|
|
|
|
|
|
|
1271
|
|
|
|
|
|
|
Clone the repository first: |
1272
|
|
|
|
|
|
|
|
1273
|
|
|
|
|
|
|
$ {{$MY::repo_clone}} |
1274
|
|
|
|
|
|
|
$ cd perl-{{$MY::name}} |
1275
|
|
|
|
|
|
|
|
1276
|
|
|
|
|
|
|
To build a distribution from the source, run: |
1277
|
|
|
|
|
|
|
|
1278
|
|
|
|
|
|
|
$ dzil build |
1279
|
|
|
|
|
|
|
|
1280
|
|
|
|
|
|
|
If required C<Dist-Zilla> plugins are missed, the C<dzil> tool will warn you and show the command |
1281
|
|
|
|
|
|
|
to install all the required plugins, e. g.: |
1282
|
|
|
|
|
|
|
|
1283
|
|
|
|
|
|
|
Required plugin Dist::Zilla::Plugin::Test::EOL isn't installed. |
1284
|
|
|
|
|
|
|
|
1285
|
|
|
|
|
|
|
Run 'dzil authordeps' to see a list of all required plugins. |
1286
|
|
|
|
|
|
|
You can pipe the list to your CPAN client to install or update them: |
1287
|
|
|
|
|
|
|
|
1288
|
|
|
|
|
|
|
dzil authordeps --missing | cpanm |
1289
|
|
|
|
|
|
|
|
1290
|
|
|
|
|
|
|
To run the tests (to check primary software functionality): |
1291
|
|
|
|
|
|
|
|
1292
|
|
|
|
|
|
|
$ dzil test |
1293
|
|
|
|
|
|
|
|
1294
|
|
|
|
|
|
|
To run extended tests (to check source code style, documentation and other things which are not too |
1295
|
|
|
|
|
|
|
important for software end users): |
1296
|
|
|
|
|
|
|
|
1297
|
|
|
|
|
|
|
$ dzil xtest |
1298
|
|
|
|
|
|
|
|
1299
|
|
|
|
|
|
|
To install the distribution: |
1300
|
|
|
|
|
|
|
|
1301
|
|
|
|
|
|
|
$ dzil install |
1302
|
|
|
|
|
|
|
|
1303
|
|
|
|
|
|
|
or |
1304
|
|
|
|
|
|
|
|
1305
|
|
|
|
|
|
|
$ cpanm ./{{$MY::name}}-VERSION.tar.gz |
1306
|
|
|
|
|
|
|
|
1307
|
|
|
|
|
|
|
where I<VERSION> is a version of built distribution. |
1308
|
|
|
|
|
|
|
|
1309
|
|
|
|
|
|
|
To clean the directory: |
1310
|
|
|
|
|
|
|
|
1311
|
|
|
|
|
|
|
$ dzil clean |
1312
|
|
|
|
|
|
|
|
1313
|
|
|
|
|
|
|
\=cut |
1314
|
|
|
|
|
|
|
|
1315
|
|
|
|
|
|
|
__[ doc/installing.pod ]__ |
1316
|
|
|
|
|
|
|
|
1317
|
|
|
|
|
|
|
\=encoding UTF-8 |
1318
|
|
|
|
|
|
|
|
1319
|
|
|
|
|
|
|
\=head1 INSTALLING |
1320
|
|
|
|
|
|
|
|
1321
|
|
|
|
|
|
|
\=head2 With C<cpanm> |
1322
|
|
|
|
|
|
|
|
1323
|
|
|
|
|
|
|
C<cpanm> tool is (probably) the easiest way to install distribution. It automates downloading, |
1324
|
|
|
|
|
|
|
building, testing, installing, and uninstalling. |
1325
|
|
|
|
|
|
|
|
1326
|
|
|
|
|
|
|
To install the latest version from CPAN: |
1327
|
|
|
|
|
|
|
|
1328
|
|
|
|
|
|
|
$ cpanm {{$MY::package}} |
1329
|
|
|
|
|
|
|
|
1330
|
|
|
|
|
|
|
To install a specific version (e. g. I<v0.7.1>) from CPAN: |
1331
|
|
|
|
|
|
|
|
1332
|
|
|
|
|
|
|
$ cpanm {{$MY::package}}@v0.7.1 |
1333
|
|
|
|
|
|
|
|
1334
|
|
|
|
|
|
|
To install locally available distribution (e. g. previously downloaded from CPAN or built from |
1335
|
|
|
|
|
|
|
sources): |
1336
|
|
|
|
|
|
|
|
1337
|
|
|
|
|
|
|
$ cpanm ./{{$MY::name}}-v0.7.1.tar.gz |
1338
|
|
|
|
|
|
|
|
1339
|
|
|
|
|
|
|
To uninstall the distribution: |
1340
|
|
|
|
|
|
|
|
1341
|
|
|
|
|
|
|
$ cpanm -U {{$MY::package}} |
1342
|
|
|
|
|
|
|
|
1343
|
|
|
|
|
|
|
\=head2 Manually |
1344
|
|
|
|
|
|
|
|
1345
|
|
|
|
|
|
|
To install distribution tarball manually (let us assume you have version I<v0.7.1> of the |
1346
|
|
|
|
|
|
|
distribution): |
1347
|
|
|
|
|
|
|
|
1348
|
|
|
|
|
|
|
$ tar xaf {{$MY::name}}-v0.7.1.tar.gz |
1349
|
|
|
|
|
|
|
$ cd {{$MY::name}}-v0.7.1 |
1350
|
|
|
|
|
|
|
$ perl Build.PL |
1351
|
|
|
|
|
|
|
$ ./Build build |
1352
|
|
|
|
|
|
|
$ ./Build test |
1353
|
|
|
|
|
|
|
$ ./Build install |
1354
|
|
|
|
|
|
|
|
1355
|
|
|
|
|
|
|
\=head2 See Also |
1356
|
|
|
|
|
|
|
|
1357
|
|
|
|
|
|
|
L<How to install CPAN modules|http://www.cpan.org/modules/INSTALL.html> |
1358
|
|
|
|
|
|
|
|
1359
|
|
|
|
|
|
|
\=cut |
1360
|
|
|
|
|
|
|
|
1361
|
|
|
|
|
|
|
__[ doc/naming.pod ]__ |
1362
|
|
|
|
|
|
|
|
1363
|
|
|
|
|
|
|
\=encoding UTF-8 |
1364
|
|
|
|
|
|
|
|
1365
|
|
|
|
|
|
|
\=head1 NAMING |
1366
|
|
|
|
|
|
|
|
1367
|
|
|
|
|
|
|
C<perl-{{$MY::name}}> is official software name. |
1368
|
|
|
|
|
|
|
|
1369
|
|
|
|
|
|
|
However, in Perl world prefix "perl-" is redundant and not used. For example, on |
1370
|
|
|
|
|
|
|
L<meta::cpan|https://metacpan.org/> this software is named as C<{{$MY::name}}>. In the rest |
1371
|
|
|
|
|
|
|
of the documentation shortened name C<{{$MY::name}}> is used as synonym for full name |
1372
|
|
|
|
|
|
|
C<perl-{{$MY::name}}>. We are in the Perl world, aren't we? |
1373
|
|
|
|
|
|
|
|
1374
|
|
|
|
|
|
|
You may notice that name may be spelled with dashes (C<{{$MY::name}}>) or with double colons |
1375
|
|
|
|
|
|
|
(C<{{$MY::package}}>). Strictly speaking, there is difference: the first one is software |
1376
|
|
|
|
|
|
|
name, while the second is name of Perl package, but often these names are interchangeable |
1377
|
|
|
|
|
|
|
especially if software consists of single package. |
1378
|
|
|
|
|
|
|
|
1379
|
|
|
|
|
|
|
\=cut |
1380
|
|
|
|
|
|
|
|
1381
|
|
|
|
|
|
|
__[ doc/source.pod ]__ |
1382
|
|
|
|
|
|
|
|
1383
|
|
|
|
|
|
|
\=encoding UTF-8 |
1384
|
|
|
|
|
|
|
|
1385
|
|
|
|
|
|
|
\=head1 SOURCE |
1386
|
|
|
|
|
|
|
|
1387
|
|
|
|
|
|
|
C<{{$MY::name}}> source is in Mercurial repository hosted on {{$MY::repo_host}}. |
1388
|
|
|
|
|
|
|
{{$MY::repo_web ? "You can either L<browse the source online|{{$MY::repo_web}}> or " : "To |
1389
|
|
|
|
|
|
|
"}} clone the entire repository: |
1390
|
|
|
|
|
|
|
|
1391
|
|
|
|
|
|
|
$ {{$MY::repo_clone}} |
1392
|
|
|
|
|
|
|
|
1393
|
|
|
|
|
|
|
\=head2 Source Files |
1394
|
|
|
|
|
|
|
|
1395
|
|
|
|
|
|
|
C<{{$MY::name}}> source files usually include a comment near the top of the file: |
1396
|
|
|
|
|
|
|
|
1397
|
|
|
|
|
|
|
This file is part of perl-{{$MY::name}}. |
1398
|
|
|
|
|
|
|
|
1399
|
|
|
|
|
|
|
Not all source files are included into distribution. Some source files are used at distribution |
1400
|
|
|
|
|
|
|
build time only, and not required for installation. |
1401
|
|
|
|
|
|
|
|
1402
|
|
|
|
|
|
|
\=cut |
1403
|
|
|
|
|
|
|
|
1404
|
|
|
|
|
|
|
__END__ |
1405
|
|
|
|
|
|
|
|
1406
|
|
|
|
|
|
|
# end of file # |