line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
444
|
use 5.006; # our |
|
1
|
|
|
|
|
2
|
|
2
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
3
|
1
|
|
|
1
|
|
12
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
84
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package App::cpanm::meta::checker; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.001002'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Verify and sanity check your installation verses cpanm meta files |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
1
|
|
|
1
|
|
443
|
use Moo 1.000008 ('has'); |
|
1
|
|
|
|
|
9790
|
|
|
1
|
|
|
|
|
4
|
|
85
|
1
|
|
|
1
|
|
1721
|
use Path::Tiny qw( path ); |
|
1
|
|
|
|
|
8157
|
|
|
1
|
|
|
|
|
71
|
|
86
|
1
|
|
|
1
|
|
494
|
use App::cpanm::meta::checker::State; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
87
|
1
|
|
|
1
|
|
4
|
use Config qw(%Config); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
88
|
1
|
|
|
1
|
|
3
|
use Carp qw(croak); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
89
|
1
|
|
|
1
|
|
704
|
use Getopt::Long; |
|
1
|
|
|
|
|
7283
|
|
|
1
|
|
|
|
|
4
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
has 'search_dirs' => ( |
96
|
|
|
|
|
|
|
is => 'ro', |
97
|
|
|
|
|
|
|
lazy => 1, |
98
|
|
|
|
|
|
|
builder => sub { |
99
|
0
|
|
|
0
|
|
|
my @paths; |
100
|
0
|
|
|
|
|
|
push @paths, path( $Config{sitelibexp} )->child( $Config{archname} )->child('.meta'); |
101
|
0
|
|
|
|
|
|
return \@paths; |
102
|
|
|
|
|
|
|
}, |
103
|
|
|
|
|
|
|
); |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub all_search_dirs { |
114
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
115
|
0
|
|
|
|
|
|
return @{ $self->search_dirs }; |
|
0
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
sub all_search_dir_child { |
132
|
0
|
|
|
0
|
1
|
|
my ( $self, @childpath ) = @_; |
133
|
0
|
|
|
|
|
|
my @answers = grep { -e } |
134
|
0
|
|
|
|
|
|
map { path($_)->child(@childpath) } @{ $self->search_dirs }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
135
|
0
|
0
|
|
|
|
|
return @answers unless $self->sorted; |
136
|
0
|
|
|
|
|
|
return @{ [ sort @answers ] }; |
|
0
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
} |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
sub all_search_dir_children { |
155
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
156
|
0
|
|
|
|
|
|
my @answers = map { path($_)->children } @{ $self->search_dirs }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
157
|
0
|
0
|
|
|
|
|
return @answers unless $self->sorted; |
158
|
0
|
|
|
|
|
|
return @{ [ sort @answers ] }; |
|
0
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
} |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
has 'tests' => ( |
175
|
|
|
|
|
|
|
is => ro =>, |
176
|
|
|
|
|
|
|
lazy => 1, |
177
|
|
|
|
|
|
|
builder => sub { |
178
|
|
|
|
|
|
|
return [ |
179
|
0
|
|
|
0
|
|
|
'list_empty', 'list_duplicates', 'check_runtime_requires', |
180
|
|
|
|
|
|
|
'check_runtime_recommends', 'check_runtime_suggests', 'check_runtime_conflicts', |
181
|
|
|
|
|
|
|
]; |
182
|
|
|
|
|
|
|
}, |
183
|
|
|
|
|
|
|
); |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
has 'sorted' => ( |
200
|
|
|
|
|
|
|
is => ro =>, |
201
|
|
|
|
|
|
|
lazy => 1, |
202
|
0
|
|
|
0
|
|
|
builder => sub { return; }, |
203
|
|
|
|
|
|
|
); |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
has 'mode' => ( |
218
|
|
|
|
|
|
|
is => ro =>, |
219
|
|
|
|
|
|
|
lazy => 1, |
220
|
0
|
|
|
0
|
|
|
builder => sub { return 'all' }, |
221
|
|
|
|
|
|
|
); |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
sub check_path { |
232
|
0
|
|
|
0
|
1
|
|
my ( $self, $path ) = @_; |
233
|
0
|
|
|
|
|
|
my $state = App::cpanm::meta::checker::State->new( tests => $self->tests ); |
234
|
0
|
|
|
|
|
|
return $state->check_path($path); |
235
|
|
|
|
|
|
|
} |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
sub check_release { |
246
|
0
|
|
|
0
|
1
|
|
my ( $self, $releasename ) = @_; |
247
|
0
|
|
|
|
|
|
my $state = App::cpanm::meta::checker::State->new( tests => $self->tests ); |
248
|
0
|
|
|
|
|
|
for my $dir ( $self->all_search_dir_child($releasename) ) { |
249
|
0
|
|
|
|
|
|
$state->check_path($dir); |
250
|
|
|
|
|
|
|
} |
251
|
0
|
|
|
|
|
|
return; |
252
|
|
|
|
|
|
|
} |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
sub check_distname { |
265
|
0
|
|
|
0
|
1
|
|
my ( $self, $distname ) = @_; |
266
|
0
|
|
|
|
|
|
my $state = App::cpanm::meta::checker::State->new( tests => $self->tests ); |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
## no critic (Compatibility::PerlMinimumVersionAndWhy) |
269
|
|
|
|
|
|
|
# _Pulp__5010_qr_m_propagate_properly |
270
|
0
|
|
|
|
|
|
my $distname_re = qr{ |
271
|
|
|
|
|
|
|
\A |
272
|
|
|
|
|
|
|
\Q$distname\E |
273
|
|
|
|
|
|
|
- |
274
|
|
|
|
|
|
|
[^-]+ |
275
|
|
|
|
|
|
|
(?:TRIAL)? |
276
|
|
|
|
|
|
|
\z |
277
|
|
|
|
|
|
|
}msx; |
278
|
|
|
|
|
|
|
|
279
|
0
|
|
|
|
|
|
for my $dir ( grep { path($_)->basename =~ $distname_re } $self->all_search_dir_children ) { |
|
0
|
|
|
|
|
|
|
280
|
0
|
|
|
|
|
|
$state->check_path($dir); |
281
|
|
|
|
|
|
|
} |
282
|
0
|
|
|
|
|
|
return; |
283
|
|
|
|
|
|
|
} |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
sub check_all { |
294
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
295
|
|
|
|
|
|
|
|
296
|
0
|
|
|
|
|
|
my $state = App::cpanm::meta::checker::State->new( tests => $self->tests ); |
297
|
0
|
|
|
|
|
|
for my $dir ( $self->all_search_dir_children ) { |
298
|
0
|
|
|
|
|
|
$state->check_path($dir); |
299
|
|
|
|
|
|
|
} |
300
|
0
|
|
|
|
|
|
return; |
301
|
|
|
|
|
|
|
} |
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
sub run_command { |
312
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
313
|
0
|
0
|
|
|
|
|
return $self->check_all if 'all' eq $self->mode; |
314
|
0
|
|
|
|
|
|
return; |
315
|
|
|
|
|
|
|
} |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
sub new_from_command { |
350
|
0
|
|
|
0
|
1
|
|
my ( $class, %defaults ) = @_; |
351
|
|
|
|
|
|
|
|
352
|
0
|
|
|
|
|
|
my $config = {}; |
353
|
0
|
|
|
|
|
|
my $verbose; |
354
|
|
|
|
|
|
|
|
355
|
0
|
|
|
|
|
|
Getopt::Long::Configure( 'auto_version', 'auto_help' ); |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
Getopt::Long::GetOptions( |
358
|
|
|
|
|
|
|
's|sort!' => \$config->{sorted}, |
359
|
0
|
|
|
0
|
|
|
'A|all!' => sub { $config->{mode} = 'all' }, |
360
|
|
|
|
|
|
|
'verbose!' => sub { |
361
|
0
|
|
|
0
|
|
|
$verbose = $_[0]; |
362
|
|
|
|
|
|
|
}, |
363
|
|
|
|
|
|
|
'test=s' => sub { |
364
|
0
|
0
|
|
0
|
|
|
if ( not App::cpanm::meta::checker::State->can( 'x_test_' . $_[1] ) ) { |
365
|
0
|
|
|
|
|
|
croak("No such test $_[1]"); |
366
|
|
|
|
|
|
|
} |
367
|
0
|
|
|
|
|
|
push @{ $config->{tests} }, $_[1]; |
|
0
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
}, |
369
|
0
|
0
|
|
|
|
|
) or croak(Getopt::Long::HelpMessage); |
370
|
|
|
|
|
|
|
|
371
|
0
|
|
|
|
|
|
my $app_obj = $class->new( +{ %defaults, %{$config} } ); |
|
0
|
|
|
|
|
|
|
372
|
0
|
0
|
|
|
|
|
if ($verbose) { |
373
|
0
|
|
|
|
|
|
unshift @{ $app_obj->tests }, 'list'; |
|
0
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
} |
375
|
0
|
|
|
|
|
|
return $app_obj; |
376
|
|
|
|
|
|
|
} |
377
|
|
|
|
|
|
|
1; |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
__END__ |