line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
2213767
|
use 5.006; |
|
2
|
|
|
|
|
5
|
|
2
|
2
|
|
|
2
|
|
7
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
41
|
|
3
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
141
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::MetaData::BuiltWith::All; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.004005'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Go overkill and report everything in all name-spaces. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
512
|
use Moose qw( extends has around ); |
|
2
|
|
|
|
|
298577
|
|
|
2
|
|
|
|
|
12
|
|
14
|
2
|
|
|
2
|
|
8534
|
use namespace::autoclean; |
|
2
|
|
|
|
|
5598
|
|
|
2
|
|
|
|
|
13
|
|
15
|
|
|
|
|
|
|
extends 'Dist::Zilla::Plugin::MetaData::BuiltWith'; |
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
|
|
|
|
|
|
|
has 'show_failures' => ( is => 'ro', isa => 'Bool', default => 0 ); |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
around dump_config => sub { |
81
|
|
|
|
|
|
|
my ( $orig, $self, @args ) = @_; |
82
|
|
|
|
|
|
|
my $config = $self->$orig(@args); |
83
|
|
|
|
|
|
|
my $payload = $config->{ +__PACKAGE__ } = {}; |
84
|
|
|
|
|
|
|
$payload->{show_failures} = $self->show_failures; |
85
|
|
|
|
|
|
|
$payload->{ q[$] . __PACKAGE__ . q[::VERSION] } = $VERSION unless __PACKAGE__ eq ref $self; |
86
|
|
|
|
|
|
|
return $config; |
87
|
|
|
|
|
|
|
}; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
around '_metadata' => sub { |
90
|
|
|
|
|
|
|
my ( $orig, $self, @args ) = @_; |
91
|
|
|
|
|
|
|
my $stash = $self->$orig(@args); |
92
|
|
|
|
|
|
|
return { %{$stash}, %{ $self->_get_all() } }; |
93
|
|
|
|
|
|
|
}; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
96
|
2
|
|
|
2
|
|
388
|
no Moose; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
14
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub _list_modules_in_memory { |
99
|
1496
|
|
|
1496
|
|
1065
|
my ( $self, $package ) = @_; |
100
|
|
|
|
|
|
|
|
101
|
1496
|
100
|
66
|
|
|
3855
|
return $package if 'main' eq $package or $package =~ /\Amain::/msx; |
102
|
|
|
|
|
|
|
|
103
|
1495
|
|
|
|
|
916
|
my $ns = do { |
104
|
|
|
|
|
|
|
## no critic (ProhibitNoStrict) |
105
|
2
|
|
|
2
|
|
272
|
no strict 'refs'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
604
|
|
106
|
1495
|
|
|
|
|
806
|
\%{ $package . q{::} }; |
|
1495
|
|
|
|
|
2890
|
|
107
|
|
|
|
|
|
|
}; |
108
|
1495
|
|
|
|
|
918
|
my (@child_namespaces); |
109
|
1495
|
|
|
|
|
877
|
for my $child ( keys %{$ns} ) { |
|
1495
|
|
|
|
|
5282
|
|
110
|
16601
|
100
|
|
|
|
21317
|
next unless $child =~ /\A(.*)::$/msx; |
111
|
1495
|
|
|
|
|
1418
|
my $child_pkg = $1; |
112
|
1495
|
100
|
|
|
|
2571
|
$child_pkg = $package . q[::] . $child_pkg if $package; |
113
|
1495
|
|
|
|
|
1489
|
push @child_namespaces, $child_pkg; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
1495
|
|
66
|
|
|
3487
|
return ( ( $package || () ), map { $self->_list_modules_in_memory($_) } @child_namespaces ); |
|
1495
|
|
|
|
|
1587
|
|
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
sub _get_all { |
120
|
1
|
|
|
1
|
|
2
|
my ($self) = @_; |
121
|
1
|
|
|
|
|
1
|
my %modtable; |
122
|
|
|
|
|
|
|
my %failures; |
123
|
|
|
|
|
|
|
|
124
|
1
|
|
|
|
|
4
|
for my $module ( $self->_list_modules_in_memory(q{}), $self->include ) { |
125
|
1495
|
50
|
|
|
|
2561
|
if ( $module =~ /\A__ANON__/msx ) { |
126
|
0
|
|
|
|
|
0
|
$failures{$module} = 'Skipped: Anonymous Class'; |
127
|
0
|
|
|
|
|
0
|
next; |
128
|
|
|
|
|
|
|
} |
129
|
1495
|
50
|
|
|
|
2258
|
if ( $module =~ /\[/msx ) { |
130
|
0
|
|
|
|
|
0
|
$failures{$module} = 'Skipped: Parameterized Type'; |
131
|
0
|
|
|
|
|
0
|
next; |
132
|
|
|
|
|
|
|
} |
133
|
1495
|
|
|
|
|
3026
|
my $result = $self->_detect_installed($module); |
134
|
|
|
|
|
|
|
|
135
|
1495
|
100
|
|
|
|
3719
|
$modtable{$module} = $result->[0] if defined $result->[0]; |
136
|
1495
|
100
|
|
|
|
5190
|
$failures{$module} = $result->[1] if defined $result->[1]; |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
|
140
|
1
|
|
|
|
|
173
|
for my $badmodule ( $self->exclude ) { |
141
|
0
|
0
|
|
|
|
0
|
delete $modtable{$badmodule} if exists $modtable{$badmodule}; |
142
|
0
|
0
|
|
|
|
0
|
delete $failures{$badmodule} if exists $failures{$badmodule}; |
143
|
|
|
|
|
|
|
} |
144
|
1
|
|
|
|
|
4
|
my $rval = { allmodules => \%modtable }; |
145
|
1
|
50
|
33
|
|
|
40
|
$rval->{allfailures} = \%failures if keys %failures and $self->show_failures; |
146
|
1
|
|
|
|
|
397
|
return $rval; |
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
1; |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
__END__ |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=pod |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=encoding UTF-8 |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head1 NAME |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
Dist::Zilla::Plugin::MetaData::BuiltWith::All - Go overkill and report everything in all name-spaces. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head1 VERSION |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
version 1.004005 |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head1 SYNOPSIS |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
[MetaData::BuiltWith::All] |
168
|
|
|
|
|
|
|
show_failures = 1 ; Not recommended |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
This module is otherwise identical to L<< C<MetaData::BuiltWith>|Dist::Zilla::Plugin::MetaData::BuiltWith >>. |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=head1 DESCRIPTION |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
This further extends the verbosity of the information reported by the L<< C<BuiltWith>|Dist::Zilla::Plugin::MetaData::BuiltWith >> plug-in, |
175
|
|
|
|
|
|
|
by recursively rooting around in the name-spaces and reporting every version of everything it finds. |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
Only recommended for the most extreme of situations where you find your code breaking all over the show between different versions of things, or for personal amusement. |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=head1 OPTIONS |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=head2 show_failures |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
Because this module reports B<ALL> C<namespaces>, it will likely report very many C<namespaces> |
184
|
|
|
|
|
|
|
which simply do not exist on disk as a distinct file, and as a result, are unlikely to have C<$VERSION> data. |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
As a result, enabling this option will drop a mother load of failures into a hash somewhere in C<x_BuiltWith>. |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
For instance, there's one for every single package in C<B::> |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
And there's one for every single instance of C<Eval::Closure::Sandbox> named C<Eval::Closure::Sandbox_.*> |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
There's one for every instance of C<Module::Metadata> ( I spotted about 80 myself ) |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
And there's one for each and every thing that uses C<__ANON__::> |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
You get the idea? |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
B<Do not turn this option on> |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
You have been warned. |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=head2 exclude |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
Specify modules to exclude from version reporting |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
exclude = Foo |
207
|
|
|
|
|
|
|
exclude = Bar |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
=head2 include |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
Specify additional modules to include the version of |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
include = Foo |
214
|
|
|
|
|
|
|
include = Bar |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=head2 show_config |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
Report "interesting" values from C<%Config::Config> |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
show_config = 1 ; Boolean |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
=head2 show_uname |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
Report the output from C<uname> |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
show_uname = 1 ; Boolean |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
=head2 uname_call |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
Specify what the system C<uname> function is called |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
uname_call = uname ; String |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
=head2 uname_args |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
Specify arguments passed to the C<uname> call. |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
uname_args = -a ; String |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
=head1 WARNING |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
At present this code does no recursion prevention, apart from excluding the C<main> name-space. |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
If it sees other name-spaces which recur into their self indefinitely ( like main does ), then it may not terminate normally. |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
Also, using this module will likely add 1000 lines to C<META.yml>, so please for the love of sanity don't use this too often. |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=head1 AUTHOR |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
Kent Fredric <kentnl@cpan.org> |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Kent Fredric <kentnl@cpan.org>. |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
257
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
=cut |