Revision 26a34e33
Von Sven Schöling vor fast 13 Jahren hinzugefügt
scripts/find-use.pl | ||
---|---|---|
30 | 30 |
'Template::Iterator' => 1, |
31 | 31 |
'Template::Plugin' => 1, |
32 | 32 |
'Template::Plugin::Filter' => 1, |
33 |
'Template::Plugin::HTML' => 1, |
|
33 | 34 |
}, |
35 |
'Devel::REPL' => { |
|
36 |
'namespace::clean' => 1, |
|
37 |
} |
|
34 | 38 |
); |
35 | 39 |
|
36 | 40 |
find(sub { |
... | ... | |
81 | 85 |
my $version = Module::CoreList->first_release($module); |
82 | 86 |
$modules{$module} = { status => $supplied{$module} ? 'included' |
83 | 87 |
: $version ? sprintf '%2.6f', $version |
84 |
: is_documented($module) ? 'required' |
|
88 |
: is_required($module) ? 'required' |
|
89 |
: is_optional($module) ? 'optional' |
|
90 |
: is_developer($module) ? 'developer' |
|
85 | 91 |
: '!missing', |
86 | 92 |
files => $uselines{$useline}, |
87 | 93 |
}; |
... | ... | |
103 | 109 |
for my $dst_module (keys %{ $requires{$src_module} }) { |
104 | 110 |
if ( $modules{$src_module} |
105 | 111 |
&& $modules{$dst_module} |
106 |
&& $modules{$src_module}->{status} =~ /^required/
|
|
112 |
&& $modules{$src_module}->{status} =~ /^(required|devel|optional)/
|
|
107 | 113 |
&& $modules{$dst_module}->{status} eq '!missing') { |
108 | 114 |
$modules{$dst_module}->{status} = "required"; # . ", via $src_module"; |
109 | 115 |
$changed = 1; |
... | ... | |
128 | 134 |
} |
129 | 135 |
} |
130 | 136 |
|
131 |
sub is_documented {
|
|
137 |
sub is_required {
|
|
132 | 138 |
my ($module) = @_; |
133 | 139 |
grep { $_->{name} eq $module } @SL::InstallationCheck::required_modules; |
134 | 140 |
} |
135 | 141 |
|
142 |
sub is_optional { |
|
143 |
my ($module) = @_; |
|
144 |
grep { $_->{name} eq $module } @SL::InstallationCheck::optional_modules; |
|
145 |
} |
|
146 |
|
|
147 |
sub is_developer { |
|
148 |
my ($module) = @_; |
|
149 |
grep { $_->{name} eq $module } @SL::InstallationCheck::developer_modules; |
|
150 |
} |
|
151 |
|
|
136 | 152 |
sub color_text { |
137 | 153 |
my ($text) = @_; |
138 | 154 |
return color(get_color($text)) . $text . color('reset'); |
Auch abrufbar als: Unified diff
find-use: Unterscheidung zwischen required, optional, developer.