line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Metadata::CoreList; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
98193
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
78
|
|
4
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
74
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
12
|
use Config; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
98
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
1222
|
use Date::Simple; |
|
3
|
|
|
|
|
12659
|
|
|
3
|
|
|
|
|
96
|
|
9
|
|
|
|
|
|
|
|
10
|
3
|
|
|
3
|
|
20
|
use File::Spec; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
56
|
|
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
4149
|
use Module::CoreList; |
|
3
|
|
|
|
|
87501
|
|
|
3
|
|
|
|
|
27
|
|
13
|
3
|
|
|
3
|
|
2554
|
use Module::Metadata::CoreList::Config; |
|
3
|
|
|
|
|
15
|
|
|
3
|
|
|
|
|
95
|
|
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
3
|
|
24
|
use Moo; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
14
|
|
16
|
|
|
|
|
|
|
|
17
|
3
|
|
|
3
|
|
2569
|
use Text::Xslate 'mark_raw'; |
|
3
|
|
|
|
|
21365
|
|
|
3
|
|
|
|
|
185
|
|
18
|
|
|
|
|
|
|
|
19
|
3
|
|
|
3
|
|
23
|
use Types::Standard qw/HashRef Str/; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
30
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has config => |
22
|
|
|
|
|
|
|
( |
23
|
|
|
|
|
|
|
default => sub{return Module::Metadata::CoreList::Config -> new -> config}, |
24
|
|
|
|
|
|
|
is => 'rw', |
25
|
|
|
|
|
|
|
isa => HashRef, |
26
|
|
|
|
|
|
|
required => 0, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has dir_name => |
30
|
|
|
|
|
|
|
( |
31
|
|
|
|
|
|
|
default => sub{return '.'}, |
32
|
|
|
|
|
|
|
is => 'rw', |
33
|
|
|
|
|
|
|
isa => Str, |
34
|
|
|
|
|
|
|
required => 0, |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has file_name => |
38
|
|
|
|
|
|
|
( |
39
|
|
|
|
|
|
|
default => sub{return ''}, |
40
|
|
|
|
|
|
|
is => 'rw', |
41
|
|
|
|
|
|
|
isa => Str, |
42
|
|
|
|
|
|
|
required => 0, |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
has module_name => |
46
|
|
|
|
|
|
|
( |
47
|
|
|
|
|
|
|
default => sub{return ''}, |
48
|
|
|
|
|
|
|
is => 'rw', |
49
|
|
|
|
|
|
|
isa => Str, |
50
|
|
|
|
|
|
|
required => 0, |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
has perl_version => |
54
|
|
|
|
|
|
|
( |
55
|
|
|
|
|
|
|
default => sub{return ''}, |
56
|
|
|
|
|
|
|
is => 'rw', |
57
|
|
|
|
|
|
|
isa => Str, |
58
|
|
|
|
|
|
|
required => 0, |
59
|
|
|
|
|
|
|
); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
has report_type => |
62
|
|
|
|
|
|
|
( |
63
|
|
|
|
|
|
|
default => sub{return 'text'}, |
64
|
|
|
|
|
|
|
is => 'rw', |
65
|
|
|
|
|
|
|
isa => Str, |
66
|
|
|
|
|
|
|
required => 0, |
67
|
|
|
|
|
|
|
); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
our $VERSION = '1.09'; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# ------------------------------------------------ |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub _build_environment |
74
|
|
|
|
|
|
|
{ |
75
|
0
|
|
|
0
|
|
0
|
my($self) = @_; |
76
|
|
|
|
|
|
|
|
77
|
0
|
|
|
|
|
0
|
my(@environment); |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
# mark_raw() is needed because of the HTML tag . |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
push @environment, |
82
|
|
|
|
|
|
|
{left => 'Author', right => mark_raw(qq|Ron Savage|)}, |
83
|
|
|
|
|
|
|
{left => 'Date', right => Date::Simple -> today}, |
84
|
|
|
|
|
|
|
{left => 'OS', right => 'Debian V 6.0.4'}, |
85
|
0
|
|
|
|
|
0
|
{left => 'Perl', right => $Config{version} }; |
86
|
|
|
|
|
|
|
|
87
|
0
|
|
|
|
|
0
|
return \@environment; |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
# End of _build_environment. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
# ----------------------------------------------- |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub check_perl_for_module |
94
|
|
|
|
|
|
|
{ |
95
|
0
|
|
|
0
|
1
|
0
|
my($self) = @_; |
96
|
0
|
|
|
|
|
0
|
my($module_name) = $self -> module_name; |
97
|
0
|
|
|
|
|
0
|
my($perl_version) = $self -> perl_version; |
98
|
|
|
|
|
|
|
|
99
|
0
|
0
|
0
|
|
|
0
|
if ($module_name && $perl_version) |
100
|
|
|
|
|
|
|
{ |
101
|
0
|
0
|
0
|
|
|
0
|
if ($Module::CoreList::version{$perl_version} && exists $Module::CoreList::version{$perl_version}{$module_name}) |
102
|
|
|
|
|
|
|
{ |
103
|
0
|
0
|
|
|
|
0
|
print exists $Module::CoreList::version{$perl_version}{$module_name} ? $Module::CoreList::version{$perl_version}{$module_name} : 'undef', "\n"; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
else |
106
|
|
|
|
|
|
|
{ |
107
|
0
|
|
|
|
|
0
|
die "Unknown version of Perl ($perl_version), or unknown module ($module_name)\n"; |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
else |
111
|
|
|
|
|
|
|
{ |
112
|
0
|
|
|
|
|
0
|
die "Either module_name or perl_version not specified\n"; |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
# Return 0 for success and 1 for failure. |
116
|
|
|
|
|
|
|
|
117
|
0
|
|
|
|
|
0
|
return 0; |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
} # End of check_perl_for_module. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
# ----------------------------------------------- |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub check_perl_module |
124
|
|
|
|
|
|
|
{ |
125
|
1
|
|
|
1
|
1
|
1269
|
my($self) = @_; |
126
|
1
|
|
|
|
|
23
|
my($module_name) = $self -> module_name; |
127
|
1
|
|
|
|
|
23
|
my($perl_version) = $self -> perl_version; |
128
|
|
|
|
|
|
|
|
129
|
1
|
50
|
|
|
|
9
|
if ($module_name) |
|
|
0
|
|
|
|
|
|
130
|
|
|
|
|
|
|
{ |
131
|
1
|
50
|
|
|
|
16
|
my($prefix) = "Module names which match the regexp qr/$module_name/" . ($perl_version ? " in Perl V $perl_version: " : ': '); |
132
|
|
|
|
|
|
|
|
133
|
1
|
50
|
|
|
|
34
|
print $prefix, join(', ', Module::CoreList::find_modules(qr/$module_name/, $perl_version ? $perl_version : () ) ), ". \n"; |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
elsif ($perl_version) |
136
|
|
|
|
|
|
|
{ |
137
|
0
|
0
|
|
|
|
0
|
print 'Module::CoreList ', (Module::CoreList::find_version($perl_version) ? 'recognizes' : 'does not recognize'), " V $perl_version of Perl. \n"; |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
else |
140
|
|
|
|
|
|
|
{ |
141
|
0
|
|
|
|
|
0
|
die "Neither module_name nor perl_version specified\n"; |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
# Return 0 for success and 1 for failure. |
145
|
|
|
|
|
|
|
|
146
|
1
|
|
|
|
|
26142
|
return 0; |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
} # End of check_perl_module. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
# ----------------------------------------------- |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
sub process_build_pl |
153
|
|
|
|
|
|
|
{ |
154
|
0
|
|
|
0
|
1
|
0
|
my($self, $line_ara) = @_; |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
# Assumed input format: |
157
|
|
|
|
|
|
|
# build_requires => |
158
|
|
|
|
|
|
|
# { |
159
|
|
|
|
|
|
|
# "Test::More" => 0, |
160
|
|
|
|
|
|
|
# 'Test::Pod' => 0, |
161
|
|
|
|
|
|
|
# }, |
162
|
|
|
|
|
|
|
# configure_requires => |
163
|
|
|
|
|
|
|
# { |
164
|
|
|
|
|
|
|
# Module::Build => 0, |
165
|
|
|
|
|
|
|
# }, |
166
|
|
|
|
|
|
|
# requires => |
167
|
|
|
|
|
|
|
# { |
168
|
|
|
|
|
|
|
# Module::CoreList => 0, |
169
|
|
|
|
|
|
|
# }, |
170
|
|
|
|
|
|
|
|
171
|
0
|
|
|
|
|
0
|
my(@name); |
172
|
|
|
|
|
|
|
|
173
|
0
|
|
|
|
|
0
|
my($candidate) = 0; |
174
|
|
|
|
|
|
|
|
175
|
0
|
|
|
|
|
0
|
for my $line (@$line_ara) |
176
|
|
|
|
|
|
|
{ |
177
|
0
|
0
|
0
|
|
|
0
|
if ($line =~ /^\s*(?:build_|configure_|)requires/i) |
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
178
|
|
|
|
|
|
|
{ |
179
|
0
|
|
|
|
|
0
|
$candidate = 1; |
180
|
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
elsif ($candidate && $line =~ /^\s*}/) |
182
|
|
|
|
|
|
|
{ |
183
|
0
|
|
|
|
|
0
|
$candidate = 0; |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
elsif ($candidate && ($line =~ /^\s*(['"])?([\w:]+)\1?\s*=>\s*(.+),/) ) # Add ' to comment for UltraEdit. |
186
|
|
|
|
|
|
|
{ |
187
|
0
|
|
|
|
|
0
|
push @name, [$2, $3]; |
188
|
|
|
|
|
|
|
} |
189
|
|
|
|
|
|
|
} |
190
|
|
|
|
|
|
|
|
191
|
0
|
|
|
|
|
0
|
return [sort{$$a[0] cmp $$b[0]} @name]; |
|
0
|
|
|
|
|
0
|
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
} # End of process_build_pl. |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
# ----------------------------------------------- |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
sub process_makefile_pl |
198
|
|
|
|
|
|
|
{ |
199
|
1
|
|
|
1
|
1
|
3
|
my($self, $line_ara) = @_; |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
# Assumed input format: |
202
|
|
|
|
|
|
|
# PREREQ_PM => |
203
|
|
|
|
|
|
|
# { |
204
|
|
|
|
|
|
|
# Module::CoreList => 0, |
205
|
|
|
|
|
|
|
# 'Test::More' => 0, |
206
|
|
|
|
|
|
|
# "Test::Pod" => 0, |
207
|
|
|
|
|
|
|
# }, |
208
|
|
|
|
|
|
|
|
209
|
1
|
|
|
|
|
3
|
my(@name); |
210
|
|
|
|
|
|
|
|
211
|
1
|
|
|
|
|
3
|
my($candidate) = 0; |
212
|
|
|
|
|
|
|
|
213
|
1
|
|
|
|
|
3
|
for my $line (@$line_ara) |
214
|
|
|
|
|
|
|
{ |
215
|
87
|
100
|
100
|
|
|
453
|
if ($line =~ /^\s*PREREQ_PM/i) |
|
|
100
|
100
|
|
|
|
|
|
|
100
|
|
|
|
|
|
216
|
|
|
|
|
|
|
{ |
217
|
1
|
|
|
|
|
4
|
$candidate = 1; |
218
|
|
|
|
|
|
|
} |
219
|
|
|
|
|
|
|
elsif ($candidate && $line =~ /^\s*}/) |
220
|
|
|
|
|
|
|
{ |
221
|
1
|
|
|
|
|
3
|
$candidate = 0; |
222
|
|
|
|
|
|
|
} |
223
|
|
|
|
|
|
|
elsif ($candidate && ($line =~ /^\s*(['"])?([\w:]+)\1?\s*=>\s*(.+),/) ) # Add ' to comment for UltraEdit. |
224
|
|
|
|
|
|
|
{ |
225
|
16
|
|
|
|
|
49
|
push @name, [$2, $3]; |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
} |
228
|
|
|
|
|
|
|
|
229
|
1
|
|
|
|
|
6
|
return [sort{$$a[0] cmp $$b[0]} @name]; |
|
33
|
|
|
|
|
55
|
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
} # End of process_makefile_pl. |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
# ----------------------------------------------- |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
sub report_as_html |
236
|
|
|
|
|
|
|
{ |
237
|
0
|
|
|
0
|
1
|
0
|
my($self, $module_list) = @_; |
238
|
|
|
|
|
|
|
my($templater) = Text::Xslate -> new |
239
|
|
|
|
|
|
|
( |
240
|
|
|
|
|
|
|
input_layer => '', |
241
|
0
|
|
|
|
|
0
|
path => ${$self -> config}{template_path}, |
242
|
0
|
|
|
|
|
0
|
); |
243
|
|
|
|
|
|
|
|
244
|
0
|
|
|
|
|
0
|
my(%module_list) = map{($$_[0] => undef)} @$module_list; |
|
0
|
|
|
|
|
0
|
|
245
|
0
|
|
|
|
|
0
|
my(%module_version) = map{($$_[0] => $$_[1])} @$module_list; |
|
0
|
|
|
|
|
0
|
|
246
|
0
|
|
|
|
|
0
|
my($perl_version) = $self -> perl_version; |
247
|
0
|
|
|
|
|
0
|
my(@present) = [{td => 'Module'}, {td => $self -> file_name}, {td => 'CoreList'}]; |
248
|
|
|
|
|
|
|
|
249
|
0
|
|
|
|
|
0
|
for my $name (@$module_list) |
250
|
|
|
|
|
|
|
{ |
251
|
0
|
|
|
|
|
0
|
for my $module (sort keys %{$Module::CoreList::version{$perl_version} }) |
|
0
|
|
|
|
|
0
|
|
252
|
|
|
|
|
|
|
{ |
253
|
0
|
0
|
|
|
|
0
|
if ($module eq $$name[0]) |
254
|
|
|
|
|
|
|
{ |
255
|
0
|
|
0
|
|
|
0
|
$module_list{$module} = $Module::CoreList::version{$perl_version}{$module} || 0; |
256
|
|
|
|
|
|
|
|
257
|
0
|
|
|
|
|
0
|
push @present, [{td => $$name[0]}, {td => $$name[1]} , {td => $module_list{$module} }]; |
258
|
|
|
|
|
|
|
} |
259
|
|
|
|
|
|
|
} |
260
|
|
|
|
|
|
|
} |
261
|
|
|
|
|
|
|
|
262
|
0
|
|
|
|
|
0
|
my(@absent) = [{td => 'Module'}, {td => $self -> file_name}]; |
263
|
|
|
|
|
|
|
|
264
|
0
|
|
|
|
|
0
|
for my $name (sort keys %module_list) |
265
|
|
|
|
|
|
|
{ |
266
|
0
|
0
|
|
|
|
0
|
if (! defined $module_list{$name}) |
267
|
|
|
|
|
|
|
{ |
268
|
0
|
|
|
|
|
0
|
push @absent, [{td => $name} ,{td => $module_version{$name} }]; |
269
|
|
|
|
|
|
|
} |
270
|
|
|
|
|
|
|
} |
271
|
|
|
|
|
|
|
|
272
|
0
|
|
|
|
|
0
|
my($config) = $self -> config; |
273
|
0
|
|
|
|
|
0
|
my(@module_list) = |
274
|
|
|
|
|
|
|
( |
275
|
|
|
|
|
|
|
'Module::CoreList', |
276
|
|
|
|
|
|
|
'Module::Metadata::CoreList', |
277
|
|
|
|
|
|
|
); |
278
|
|
|
|
|
|
|
|
279
|
0
|
0
|
|
|
|
0
|
push @module_list, 'Data::Session' if ($ENV{AUTHOR_TESTING}); |
280
|
|
|
|
|
|
|
|
281
|
0
|
|
|
|
|
0
|
print $templater -> render |
282
|
|
|
|
|
|
|
( |
283
|
|
|
|
|
|
|
'web.page.tx', |
284
|
|
|
|
|
|
|
{ |
285
|
0
|
|
|
|
|
0
|
absent_heading => "Modules found in @{[$self -> file_name]} but not in Module::CoreList V $Module::CoreList::VERSION", |
286
|
|
|
|
|
|
|
absent_modules => [@absent], |
287
|
|
|
|
|
|
|
default_css => "$$config{css_url}/default.css", |
288
|
|
|
|
|
|
|
environment => $self -> _build_environment, |
289
|
|
|
|
|
|
|
fancy_table_css => "$$config{css_url}/fancy.table.css", |
290
|
|
|
|
|
|
|
module_list => mark_raw(join(', ', @module_list) ), |
291
|
0
|
|
|
|
|
0
|
options => "-d @{[$self -> dir_name]} -f @{[$self -> file_name]} -p @{[$self -> perl_version]}", |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
292
|
0
|
|
|
|
|
0
|
present_heading => "Modules found in @{[$self -> file_name]} and in Module::CoreList V $Module::CoreList::VERSION", |
293
|
|
|
|
|
|
|
present_modules => [@present], |
294
|
|
|
|
|
|
|
version => $VERSION, |
295
|
|
|
|
|
|
|
} |
296
|
|
|
|
|
|
|
); |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
} # End of report_as_html. |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
# ----------------------------------------------- |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
sub report_as_text |
303
|
|
|
|
|
|
|
{ |
304
|
1
|
|
|
1
|
1
|
4
|
my($self, $module_list) = @_; |
305
|
|
|
|
|
|
|
|
306
|
1
|
|
|
|
|
3
|
print "Options: -d @{[$self -> dir_name]} -f @{[$self -> file_name]} -p @{[$self -> perl_version]}. \n"; |
|
1
|
|
|
|
|
16
|
|
|
1
|
|
|
|
|
22
|
|
|
1
|
|
|
|
|
22
|
|
307
|
|
|
|
|
|
|
|
308
|
1
|
|
|
|
|
70
|
my(%module_list) = map{($$_[0] => undef)} @$module_list; |
|
16
|
|
|
|
|
43
|
|
309
|
1
|
|
|
|
|
5
|
my(%module_version) = map{($$_[0] => $$_[1])} @$module_list; |
|
16
|
|
|
|
|
36
|
|
310
|
|
|
|
|
|
|
|
311
|
1
|
|
|
|
|
5
|
print "Modules found in @{[$self -> file_name]} and in Module::CoreList V $Module::CoreList::VERSION:\n"; |
|
1
|
|
|
|
|
20
|
|
312
|
|
|
|
|
|
|
|
313
|
1
|
|
|
|
|
33
|
my($perl_version) = $self -> perl_version; |
314
|
|
|
|
|
|
|
|
315
|
1
|
|
|
|
|
8
|
for my $name (@$module_list) |
316
|
|
|
|
|
|
|
{ |
317
|
16
|
|
|
|
|
34
|
for my $module (sort keys %{$Module::CoreList::version{$perl_version} }) |
|
16
|
|
|
|
|
121
|
|
318
|
|
|
|
|
|
|
{ |
319
|
5664
|
100
|
|
|
|
56060
|
if ($module eq $$name[0]) |
320
|
|
|
|
|
|
|
{ |
321
|
7
|
|
100
|
|
|
53
|
$module_list{$module} = $Module::CoreList::version{$perl_version}{$module} || 0; |
322
|
|
|
|
|
|
|
|
323
|
7
|
|
|
|
|
233
|
print "$module => $$name[1] and $module_list{$module}. \n"; |
324
|
|
|
|
|
|
|
} |
325
|
|
|
|
|
|
|
} |
326
|
|
|
|
|
|
|
} |
327
|
|
|
|
|
|
|
|
328
|
1
|
|
|
|
|
5
|
print "Modules found in @{[$self -> file_name]} but not in Module::CoreList V $Module::CoreList::VERSION: \n"; |
|
1
|
|
|
|
|
68
|
|
329
|
|
|
|
|
|
|
|
330
|
1
|
|
|
|
|
37
|
for my $name (sort keys %module_list) |
331
|
|
|
|
|
|
|
{ |
332
|
16
|
100
|
|
|
|
47
|
if (! defined $module_list{$name}) |
333
|
|
|
|
|
|
|
{ |
334
|
9
|
|
|
|
|
49
|
print "$name => $module_version{$name}. \n"; |
335
|
|
|
|
|
|
|
} |
336
|
|
|
|
|
|
|
} |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
} # End of report_as_text. |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
# ----------------------------------------------- |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
sub run |
343
|
|
|
|
|
|
|
{ |
344
|
1
|
|
|
1
|
1
|
1346
|
my($self) = @_; |
345
|
1
|
|
|
|
|
31
|
my($file_name) = $self -> file_name; |
346
|
|
|
|
|
|
|
|
347
|
1
|
50
|
|
|
|
12
|
if (! $file_name) |
|
|
0
|
|
|
|
|
|
348
|
|
|
|
|
|
|
{ |
349
|
1
|
|
|
|
|
3
|
$file_name = 'Build.PL|Makefile.PL'; |
350
|
|
|
|
|
|
|
} |
351
|
|
|
|
|
|
|
elsif ($file_name !~ /^(?:Build.PL|Makefile.PL)$/i) |
352
|
|
|
|
|
|
|
{ |
353
|
0
|
|
|
|
|
0
|
die "The file_name option's value must be either Build.PL or Makefile.PL\n"; |
354
|
|
|
|
|
|
|
} |
355
|
|
|
|
|
|
|
|
356
|
1
|
50
|
|
|
|
18
|
opendir(INX, $self -> dir_name) || die "Can't opendir(@{[$self -> dir_name]}): $!\n"; |
|
0
|
|
|
|
|
0
|
|
357
|
1
|
|
|
|
|
94
|
my(@file) = sort grep{/^(?:$file_name)$/} readdir INX; |
|
25
|
|
|
|
|
100
|
|
358
|
1
|
|
|
|
|
13
|
closedir INX; |
359
|
|
|
|
|
|
|
|
360
|
1
|
50
|
|
|
|
5
|
if ($#file < 0) |
361
|
|
|
|
|
|
|
{ |
362
|
0
|
|
|
|
|
0
|
die "Can't find either Build.PL or Makefile.PL in directory '@{[$self -> dir_name]}'\n"; |
|
0
|
|
|
|
|
0
|
|
363
|
|
|
|
|
|
|
} |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
# Read whatever name ends up in $file[0]. |
366
|
|
|
|
|
|
|
|
367
|
1
|
|
|
|
|
23
|
$self -> file_name($file[0]); |
368
|
|
|
|
|
|
|
|
369
|
1
|
50
|
|
|
|
51
|
open(INX, File::Spec -> catfile($self -> dir_name, $file[0]) ) || die "Can't open($file[0]): $!\n"; |
370
|
1
|
|
|
|
|
94
|
my(@line) = ; |
371
|
1
|
|
|
|
|
9
|
close INX; |
372
|
|
|
|
|
|
|
|
373
|
1
|
|
|
|
|
6
|
chomp @line; |
374
|
|
|
|
|
|
|
|
375
|
1
|
|
|
|
|
2
|
my($module_list); |
376
|
|
|
|
|
|
|
|
377
|
1
|
50
|
|
|
|
5
|
if ($file[0] eq 'Build.PL') |
378
|
|
|
|
|
|
|
{ |
379
|
0
|
|
|
|
|
0
|
$module_list = $self -> process_build_pl(\@line); |
380
|
|
|
|
|
|
|
} |
381
|
|
|
|
|
|
|
else |
382
|
|
|
|
|
|
|
{ |
383
|
1
|
|
|
|
|
7
|
$module_list = $self -> process_makefile_pl(\@line); |
384
|
|
|
|
|
|
|
} |
385
|
|
|
|
|
|
|
|
386
|
1
|
50
|
|
|
|
23
|
if ($self -> report_type =~ /^h/i) |
387
|
|
|
|
|
|
|
{ |
388
|
0
|
|
|
|
|
0
|
$self -> report_as_html($module_list); |
389
|
|
|
|
|
|
|
} |
390
|
|
|
|
|
|
|
else |
391
|
|
|
|
|
|
|
{ |
392
|
1
|
|
|
|
|
15
|
$self -> report_as_text($module_list); |
393
|
|
|
|
|
|
|
} |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
# Return 0 for success and 1 for failure. |
396
|
|
|
|
|
|
|
|
397
|
1
|
|
|
|
|
23
|
return 0; |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
} # End of run. |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
# ----------------------------------------------- |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
1; |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
=head1 NAME |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
Module::Metadata::CoreList - Scripts to cross-check Build.PL/Makefile.PL with Module::CoreList, etc |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
=head1 Synopsis |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
These scripts are shipped in the bin/ directory of the distro, and hence are installed along with the modules, |
412
|
|
|
|
|
|
|
and will then be on your $PATH. |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
=head2 bin/cc.corelist.pl |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
bin/cc.corelist.pl is a parameterized version of the following code. |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
Try running cc.corelist.pl -h. |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
#!/usr/bin/env perl |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
use strict; |
423
|
|
|
|
|
|
|
use warnings; |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
use Module::Metadata::CoreList; |
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
# ----------------------------------------------- |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
Module::Metadata::CoreList -> new |
430
|
|
|
|
|
|
|
( |
431
|
|
|
|
|
|
|
dir_name => '/home/ron/perl.modules/Data-Session', |
432
|
|
|
|
|
|
|
perl_version => '5.012001', |
433
|
|
|
|
|
|
|
report_type => 'html', |
434
|
|
|
|
|
|
|
) -> run; |
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
=head2 bin/cc.perlmodule.pl |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
bin/cc.perlmodule.pl is a parameterized version of the following code. |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
Try running cc.perlmodule.pl -h. |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
=head3 Usage with just a Perl version specified: |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
#!/usr/bin/env perl |
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
use strict; |
447
|
|
|
|
|
|
|
use warnings; |
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
use Module::Metadata::CoreList; |
450
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
# ----------------------------------------------- |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
Module::Metadata::CoreList -> new |
454
|
|
|
|
|
|
|
( |
455
|
|
|
|
|
|
|
perl_version => '5.012001', |
456
|
|
|
|
|
|
|
) -> check_perl_module; |
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
Output: |
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
Module::CoreList recognizes V 5.012001 of Perl. |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
But try running it with perl_version => '5.012005' and the output is: |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
Module::CoreList does not recognize V 5.012005 of Perl. |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
=head3 Usage with module_name specified, with or without perl_version specified: |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
#!/usr/bin/env perl |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
use strict; |
471
|
|
|
|
|
|
|
use warnings; |
472
|
|
|
|
|
|
|
|
473
|
|
|
|
|
|
|
use Module::Metadata::CoreList; |
474
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
# ----------------------------------------------- |
476
|
|
|
|
|
|
|
|
477
|
|
|
|
|
|
|
Module::Metadata::CoreList -> new |
478
|
|
|
|
|
|
|
( |
479
|
|
|
|
|
|
|
module_name => 'warnings', |
480
|
|
|
|
|
|
|
) -> check_perl_module; |
481
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
Output: |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
Module names which match the regexp qr/warnings/: encoding::warnings, warnings, warnings::register. |
485
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
Now add perl_version => '5.008001', and the output is: |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
Module names which match the regexp qr/warnings/ in Perl V 5.008001: warnings, warnings::register. |
489
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
This means encoding::warnings was not shipped in V 5.8.1 of Perl. |
491
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
=head2 cc.whichperlmodule.pl |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
Run this module as: |
495
|
|
|
|
|
|
|
|
496
|
|
|
|
|
|
|
cc.whichperlmodule.pl -p 5.008001 -m Module::CoreList |
497
|
|
|
|
|
|
|
cc.whichperlmodule.pl -p 5.014001 -m Module::CoreList |
498
|
|
|
|
|
|
|
cc.whichperlmodule.pl -p 5.014002 -m strict |
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
and the outputs will be: |
501
|
|
|
|
|
|
|
|
502
|
|
|
|
|
|
|
Unknown version of Perl (5.008001), or unknown module (Module::CoreList) |
503
|
|
|
|
|
|
|
2.49_01 |
504
|
|
|
|
|
|
|
1.04 |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
meaning that if the module was shipped with that version of Perl, the version # of the module is reported. |
507
|
|
|
|
|
|
|
|
508
|
|
|
|
|
|
|
There is no -report_type option for this program. Output is just 1 line of text. |
509
|
|
|
|
|
|
|
This means there is no need to edit the config file to run cc.whichperlmodule.pl. |
510
|
|
|
|
|
|
|
|
511
|
|
|
|
|
|
|
=head1 Description |
512
|
|
|
|
|
|
|
|
513
|
|
|
|
|
|
|
L is a pure Perl module. |
514
|
|
|
|
|
|
|
|
515
|
|
|
|
|
|
|
=head2 Usage via method check_perl_for_module() |
516
|
|
|
|
|
|
|
|
517
|
|
|
|
|
|
|
This usage cross-checks a module's existence within the modules shipped with a specific version of Perl. |
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
It's aim is to aid module authors in fine-tuning the versions of modules listed in Build.PL and Makefile.PL. |
520
|
|
|
|
|
|
|
|
521
|
|
|
|
|
|
|
See L as discussed in the synopsis. |
522
|
|
|
|
|
|
|
|
523
|
|
|
|
|
|
|
=head2 Usage via method check_perl_module() |
524
|
|
|
|
|
|
|
|
525
|
|
|
|
|
|
|
This usage tells you whether or not you have correctly specified a Perl version number, as recognized by |
526
|
|
|
|
|
|
|
L.find_version() function. |
527
|
|
|
|
|
|
|
|
528
|
|
|
|
|
|
|
Further, you can detrmine whether or not a specific module is shipped with a specific version of Perl, by calling |
529
|
|
|
|
|
|
|
L.find_modules(). |
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
See L as discussed in the synopsis. |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
=head2 Usage via method run() |
534
|
|
|
|
|
|
|
|
535
|
|
|
|
|
|
|
This usage cross-checks a module's pre-requisites with the versions shipped with a specific version of Perl. |
536
|
|
|
|
|
|
|
|
537
|
|
|
|
|
|
|
It's aim is to aid module authors in fine-tuning the versions of modules listed in Build.PL and Makefile.PL. |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
It does this by reading Build.PL or Makefile.PL to get a list of pre-requisites, and looks |
540
|
|
|
|
|
|
|
up those module names in L. |
541
|
|
|
|
|
|
|
|
542
|
|
|
|
|
|
|
The output report can be in either text or HTML. |
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
Here is a sample HTML report: L. |
545
|
|
|
|
|
|
|
|
546
|
|
|
|
|
|
|
This report is shipped in htdocs/. |
547
|
|
|
|
|
|
|
|
548
|
|
|
|
|
|
|
See L as discussed in the synopsis. |
549
|
|
|
|
|
|
|
|
550
|
|
|
|
|
|
|
=head2 Inheritance model |
551
|
|
|
|
|
|
|
|
552
|
|
|
|
|
|
|
To keep this module light-weight, it uses L managing object attributes. |
553
|
|
|
|
|
|
|
|
554
|
|
|
|
|
|
|
=head1 Distributions |
555
|
|
|
|
|
|
|
|
556
|
|
|
|
|
|
|
This module is available as a Unix-style distro (*.tgz). |
557
|
|
|
|
|
|
|
|
558
|
|
|
|
|
|
|
See http://savage.net.au/Perl-modules.html for details. |
559
|
|
|
|
|
|
|
|
560
|
|
|
|
|
|
|
See http://savage.net.au/Perl-modules/html/installing-a-module.html for |
561
|
|
|
|
|
|
|
help on unpacking and installing. |
562
|
|
|
|
|
|
|
|
563
|
|
|
|
|
|
|
=head1 Installation |
564
|
|
|
|
|
|
|
|
565
|
|
|
|
|
|
|
=head2 The Module Itself |
566
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
Install L as you would for any C module: |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
Run: |
570
|
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
cpanm Module::Metadata::CoreList |
572
|
|
|
|
|
|
|
|
573
|
|
|
|
|
|
|
or run: |
574
|
|
|
|
|
|
|
|
575
|
|
|
|
|
|
|
sudo cpan Module::Metadata::CoreList |
576
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
or unpack the distro, and then either: |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
perl Build.PL |
580
|
|
|
|
|
|
|
./Build |
581
|
|
|
|
|
|
|
./Build test |
582
|
|
|
|
|
|
|
sudo ./Build install |
583
|
|
|
|
|
|
|
|
584
|
|
|
|
|
|
|
or: |
585
|
|
|
|
|
|
|
|
586
|
|
|
|
|
|
|
perl Makefile.PL |
587
|
|
|
|
|
|
|
make (or dmake or nmake) |
588
|
|
|
|
|
|
|
make test |
589
|
|
|
|
|
|
|
make install |
590
|
|
|
|
|
|
|
|
591
|
|
|
|
|
|
|
=head2 The Configuration File |
592
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
All that remains is to tell L your values for some options. |
594
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
For that, see config/.htmodule.metadata.corelist.conf. |
596
|
|
|
|
|
|
|
|
597
|
|
|
|
|
|
|
The default value for template_path is /dev/shm/html/assets/templates/module/metadata/corelist, |
598
|
|
|
|
|
|
|
where /dev/shm/ is the Debian RAM disk, since on my dev box I have the web server doc root dir |
599
|
|
|
|
|
|
|
set to /dev/shm/html/. |
600
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
The template files are shipped in htdocs/assets/templates/module/metadata/corelist. |
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
If you are using Build.PL, running Build (without parameters) will run scripts/copy.config.pl, |
604
|
|
|
|
|
|
|
as explained next. |
605
|
|
|
|
|
|
|
|
606
|
|
|
|
|
|
|
If you are using Makefile.PL, running make (without parameters) will also run scripts/copy.config.pl. |
607
|
|
|
|
|
|
|
|
608
|
|
|
|
|
|
|
Either way, before editing the config file, ensure you run scripts/copy.config.pl. It will copy |
609
|
|
|
|
|
|
|
the config file using L, to a directory where the run-time code in |
610
|
|
|
|
|
|
|
L will look for it. Run it manually like this: |
611
|
|
|
|
|
|
|
|
612
|
|
|
|
|
|
|
shell>cd Module-Metadata-CoreList-1.00 |
613
|
|
|
|
|
|
|
shell>perl scripts/copy.config.pl |
614
|
|
|
|
|
|
|
|
615
|
|
|
|
|
|
|
Under Debian, this directory will be $HOME/.perl/Module-Metadata-CoreList/. When you |
616
|
|
|
|
|
|
|
run copy.config.pl, it will report where it has copied the config file to. |
617
|
|
|
|
|
|
|
|
618
|
|
|
|
|
|
|
Check the docs for L to see what your operating system returns for a |
619
|
|
|
|
|
|
|
call to my_dist_config(). |
620
|
|
|
|
|
|
|
|
621
|
|
|
|
|
|
|
The point of this is that after the module is installed, the config file will be |
622
|
|
|
|
|
|
|
easily accessible and editable without needing permission to write to the directory |
623
|
|
|
|
|
|
|
structure in which modules are stored. |
624
|
|
|
|
|
|
|
|
625
|
|
|
|
|
|
|
That is why L and L are pre-requisites for this module. |
626
|
|
|
|
|
|
|
|
627
|
|
|
|
|
|
|
All modules which ship with their own config file are advised to use the same mechanism |
628
|
|
|
|
|
|
|
for storing such files. |
629
|
|
|
|
|
|
|
|
630
|
|
|
|
|
|
|
=head1 Constructor and initialization |
631
|
|
|
|
|
|
|
|
632
|
|
|
|
|
|
|
new(...) returns an object of type L. |
633
|
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
This is the class contructor. |
635
|
|
|
|
|
|
|
|
636
|
|
|
|
|
|
|
Usage: C<< Module::Metadata::CoreList -> new() >>. |
637
|
|
|
|
|
|
|
|
638
|
|
|
|
|
|
|
This method takes a hash of options. |
639
|
|
|
|
|
|
|
|
640
|
|
|
|
|
|
|
Call C as C<< new(option_1 => value_1, option_2 => value_2, ...) >>. |
641
|
|
|
|
|
|
|
|
642
|
|
|
|
|
|
|
Available options: |
643
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
=over 4 |
645
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
=item o dir_name => $dir_name |
647
|
|
|
|
|
|
|
|
648
|
|
|
|
|
|
|
Specify the directory to search in for Build.PL and/or Makefile.PL. |
649
|
|
|
|
|
|
|
|
650
|
|
|
|
|
|
|
Default: '.'. |
651
|
|
|
|
|
|
|
|
652
|
|
|
|
|
|
|
This key is optional. |
653
|
|
|
|
|
|
|
|
654
|
|
|
|
|
|
|
=item o file_name => Build.PL or Makefile.PL |
655
|
|
|
|
|
|
|
|
656
|
|
|
|
|
|
|
Specify that you only want to process the given file. |
657
|
|
|
|
|
|
|
|
658
|
|
|
|
|
|
|
This means the code searches for both Build.PL and Makefile.PL, |
659
|
|
|
|
|
|
|
and processes the first one after sorting the names alphabetically. |
660
|
|
|
|
|
|
|
|
661
|
|
|
|
|
|
|
Default: ''. |
662
|
|
|
|
|
|
|
|
663
|
|
|
|
|
|
|
This key is optional. |
664
|
|
|
|
|
|
|
|
665
|
|
|
|
|
|
|
=item o module_name => $module_name |
666
|
|
|
|
|
|
|
|
667
|
|
|
|
|
|
|
Specify the name of the module to use, in the call to check_perl_module(). |
668
|
|
|
|
|
|
|
|
669
|
|
|
|
|
|
|
When method run() is called, this value is ignored. |
670
|
|
|
|
|
|
|
|
671
|
|
|
|
|
|
|
Default: ''. |
672
|
|
|
|
|
|
|
|
673
|
|
|
|
|
|
|
This key is optional, but if omitted then perl_version must be specified. |
674
|
|
|
|
|
|
|
|
675
|
|
|
|
|
|
|
=item o perl_version => $version |
676
|
|
|
|
|
|
|
|
677
|
|
|
|
|
|
|
Specify the specific version of Perl to consider, when accessing L. |
678
|
|
|
|
|
|
|
|
679
|
|
|
|
|
|
|
Perl V 5.10.1 must be written as 5.010001, and V 5.12.1 as 5.012001. |
680
|
|
|
|
|
|
|
|
681
|
|
|
|
|
|
|
Default: ''. |
682
|
|
|
|
|
|
|
|
683
|
|
|
|
|
|
|
This key is mandatory when calling run(), but when calling check_perl_module() it need only |
684
|
|
|
|
|
|
|
be specified if module_name is not specified. |
685
|
|
|
|
|
|
|
|
686
|
|
|
|
|
|
|
=item o report_type => 'html' or 'text' |
687
|
|
|
|
|
|
|
|
688
|
|
|
|
|
|
|
Specify what type of report to produce. This report is written to STDOUT. |
689
|
|
|
|
|
|
|
|
690
|
|
|
|
|
|
|
Default: 'text'. |
691
|
|
|
|
|
|
|
|
692
|
|
|
|
|
|
|
This key is optional. |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
Here is a sample HTML report: L. |
695
|
|
|
|
|
|
|
|
696
|
|
|
|
|
|
|
This report is shipped in htdocs/. |
697
|
|
|
|
|
|
|
|
698
|
|
|
|
|
|
|
=back |
699
|
|
|
|
|
|
|
|
700
|
|
|
|
|
|
|
=head1 Methods |
701
|
|
|
|
|
|
|
|
702
|
|
|
|
|
|
|
=head2 check_perl_for_module() |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
As the name says, Perl itself is checked to see if a module ships with a given version of perl. |
705
|
|
|
|
|
|
|
|
706
|
|
|
|
|
|
|
See L as discussed in the synopsis. |
707
|
|
|
|
|
|
|
|
708
|
|
|
|
|
|
|
Method check_perl_for_module() always returns 0 (for success). |
709
|
|
|
|
|
|
|
|
710
|
|
|
|
|
|
|
=head2 check_perl_module() |
711
|
|
|
|
|
|
|
|
712
|
|
|
|
|
|
|
This module first checks the value of the module_name option. |
713
|
|
|
|
|
|
|
|
714
|
|
|
|
|
|
|
=over 4 |
715
|
|
|
|
|
|
|
|
716
|
|
|
|
|
|
|
=item o If the user has specified a module name... |
717
|
|
|
|
|
|
|
|
718
|
|
|
|
|
|
|
Use both the specified module name, and the perl version (if any), to call L |
719
|
|
|
|
|
|
|
L.find_modules(). |
720
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
The output is a single line of text. The value of report_type is ignored. |
722
|
|
|
|
|
|
|
|
723
|
|
|
|
|
|
|
=item o If the user has not specified a module name... |
724
|
|
|
|
|
|
|
|
725
|
|
|
|
|
|
|
Use just the perl version to call L.find_version(). |
726
|
|
|
|
|
|
|
|
727
|
|
|
|
|
|
|
The output is a single line of text. The values of module_name and report_type are ignored. |
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
=back |
730
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
See L as discussed in the synopsis. |
732
|
|
|
|
|
|
|
|
733
|
|
|
|
|
|
|
Method check_perl_module() always returns 0 (for success). |
734
|
|
|
|
|
|
|
|
735
|
|
|
|
|
|
|
=head2 process_build_pl($line_ara) |
736
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
Process Build.PL. |
738
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
$line_ara is an arrayref of lines, chomped, read from Build.PL. |
740
|
|
|
|
|
|
|
|
741
|
|
|
|
|
|
|
Returns an arrayref of module names extracted from the build_requires, configure_requires and requires |
742
|
|
|
|
|
|
|
sections of Build.PL. |
743
|
|
|
|
|
|
|
|
744
|
|
|
|
|
|
|
Each element of the returned arrayref is an arrayref of 2 elements: The module name and the version #. |
745
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
The arrayref is sorted by module name. |
747
|
|
|
|
|
|
|
|
748
|
|
|
|
|
|
|
Called from L. |
749
|
|
|
|
|
|
|
|
750
|
|
|
|
|
|
|
=head2 process_makefile_pl($line_ara) |
751
|
|
|
|
|
|
|
|
752
|
|
|
|
|
|
|
Process Makefile.PL. |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
$line_ara is an arrayref of lines, chomped, read from Makefile.PL. |
755
|
|
|
|
|
|
|
|
756
|
|
|
|
|
|
|
Returns an arrayref of module names extracted from the PREREQ_PM section of Makefile.PL. |
757
|
|
|
|
|
|
|
|
758
|
|
|
|
|
|
|
Each element of the returned arrayref is an arrayref of 2 elements: The module name and the version #. |
759
|
|
|
|
|
|
|
|
760
|
|
|
|
|
|
|
The arrayref is sorted by module name. |
761
|
|
|
|
|
|
|
|
762
|
|
|
|
|
|
|
Called from L. |
763
|
|
|
|
|
|
|
|
764
|
|
|
|
|
|
|
=head2 report_as_html($module_list) |
765
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
$module_list is the arrayref returned from L and L. |
767
|
|
|
|
|
|
|
|
768
|
|
|
|
|
|
|
Outputs a HTML report to STDOUT. |
769
|
|
|
|
|
|
|
|
770
|
|
|
|
|
|
|
Called from L. |
771
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
=head2 report_as_text($module_list) |
773
|
|
|
|
|
|
|
|
774
|
|
|
|
|
|
|
$module_list is the arrayref returned from L and L. |
775
|
|
|
|
|
|
|
|
776
|
|
|
|
|
|
|
Outputs a text report to STDOUT. |
777
|
|
|
|
|
|
|
|
778
|
|
|
|
|
|
|
Called from L. |
779
|
|
|
|
|
|
|
|
780
|
|
|
|
|
|
|
=head2 run() |
781
|
|
|
|
|
|
|
|
782
|
|
|
|
|
|
|
Does all the work. |
783
|
|
|
|
|
|
|
|
784
|
|
|
|
|
|
|
Calls either L or L, then calls either |
785
|
|
|
|
|
|
|
L or L. |
786
|
|
|
|
|
|
|
|
787
|
|
|
|
|
|
|
See L as discussed in the synopsis. |
788
|
|
|
|
|
|
|
|
789
|
|
|
|
|
|
|
Method run() always returns 0 (for success). |
790
|
|
|
|
|
|
|
|
791
|
|
|
|
|
|
|
=head1 Repository |
792
|
|
|
|
|
|
|
|
793
|
|
|
|
|
|
|
L |
794
|
|
|
|
|
|
|
|
795
|
|
|
|
|
|
|
=head1 Support |
796
|
|
|
|
|
|
|
|
797
|
|
|
|
|
|
|
Email the author, or log a bug on RT: |
798
|
|
|
|
|
|
|
|
799
|
|
|
|
|
|
|
L. |
800
|
|
|
|
|
|
|
|
801
|
|
|
|
|
|
|
=head1 Author |
802
|
|
|
|
|
|
|
|
803
|
|
|
|
|
|
|
L was written by Ron Savage Iron@savage.net.auE> in 2011. |
804
|
|
|
|
|
|
|
|
805
|
|
|
|
|
|
|
Homepage: L. |
806
|
|
|
|
|
|
|
|
807
|
|
|
|
|
|
|
=head1 Copyright |
808
|
|
|
|
|
|
|
|
809
|
|
|
|
|
|
|
Australian copyright (c) 2011, Ron Savage. |
810
|
|
|
|
|
|
|
|
811
|
|
|
|
|
|
|
All Programs of mine are 'OSI Certified Open Source Software'; |
812
|
|
|
|
|
|
|
you can redistribute them and/or modify them under the terms of |
813
|
|
|
|
|
|
|
The Perl License, a copy of which is available at: |
814
|
|
|
|
|
|
|
http://www.opensource.org/licenses/index.html |
815
|
|
|
|
|
|
|
|
816
|
|
|
|
|
|
|
=cut |