@@ -6,18 +6,15 @@ use warnings;
6
6
7
7
use English q< -no_match_vars> ;
8
8
9
- our $VERSION = ' 1.116 ' ;
9
+ our $VERSION = ' 1.122 ' ;
10
10
11
11
use Exporter ' import' ;
12
12
13
13
our @EXPORT_OK = qw<
14
14
required_module_versions
15
15
build_required_module_versions
16
- recommended_module_versions
17
- test_wrappers_to_generate
18
- get_PL_files
19
- dump_unlisted_or_optional_module_versions
20
16
emit_tar_warning_if_necessary
17
+ get_PL_files
21
18
> ;
22
19
23
20
@@ -35,10 +32,12 @@ sub required_module_versions {
35
32
' Exporter' => 5.63,
36
33
' File::Basename' => 0,
37
34
' File::Find' => 0,
35
+ ' File::HomeDir' => 0,
38
36
' File::Path' => 0,
39
37
' File::Spec' => 0,
40
38
' File::Spec::Unix' => 0,
41
39
' File::Temp' => 0,
40
+ ' File::Which' => 0,
42
41
' Getopt::Long' => 0,
43
42
' IO::String' => 0,
44
43
' IPC::Open2' => 1,
@@ -64,6 +63,7 @@ sub required_module_versions {
64
63
' Scalar::Util' => 0,
65
64
' String::Format' => 1.13,
66
65
' Task::Weaken' => 0,
66
+ ' Term::ANSIColor' => ' 2.02' ,
67
67
' Test::Builder' => 0.92,
68
68
' Text::ParseWords' => 3,
69
69
' base' => 0,
@@ -85,62 +85,6 @@ sub build_required_module_versions {
85
85
}
86
86
87
87
88
- sub recommended_module_versions {
89
- return (
90
- ' File::HomeDir' => 0,
91
-
92
- # If the following changes, the corresponding change needs to be made
93
- # in $Perl::Critic::Utils::Constants::_MODULE_VERSION_TERM_ANSICOLOR.
94
- ' Term::ANSIColor' => ' 2.02' ,
95
-
96
- # All of these are for Documentation::PodSpelling
97
- ' File::Which' => 0,
98
- );
99
- }
100
-
101
-
102
- sub test_wrappers_to_generate {
103
- my @tests_to_be_wrapped = qw<
104
- t/00_modules.t
105
- t/01_config.t
106
- t/01_config_bad_perlcriticrc.t
107
- t/01_policy_config.t
108
- t/02_policy.t
109
- t/03_pragmas.t
110
- t/04_options_processor.t
111
- t/05_utils.t
112
- t/05_utils_ppi.t
113
- t/05_utils_pod.t
114
- t/06_violation.t
115
- t/07_command.t
116
- t/07_perlcritic.t
117
- t/08_document.t
118
- t/09_theme.t
119
- t/10_user_profile.t
120
- t/11_policy_factory.t
121
- t/12_policy_listing.t
122
- t/12_theme_listing.t
123
- t/13_bundled_policies.t
124
- t/14_policy_parameters.t
125
- t/15_statistics.t
126
- t/20_policies.t
127
- t/20_policy_pod_spelling.t
128
- t/20_policy_prohibit_evil_modules.t
129
- t/20_policy_prohibit_hard_tabs.t
130
- t/20_policy_prohibit_trailing_whitespace.t
131
- t/20_policy_require_consistent_newlines.t
132
- t/20_policy_require_tidy_code.t
133
- xt/author/80_policysummary.t
134
- t/92_memory_leaks.t
135
- xt/author/94_includes.t
136
- > ;
137
-
138
- return
139
- map
140
- { " xt/author/generated/${_}_without_optional_dependencies.t" }
141
- @tests_to_be_wrapped ;
142
- }
143
-
144
88
my @TARGET_FILES = qw<
145
89
t/ControlStructures/ProhibitNegativeExpressionsInUnlessAndUntilConditions.run
146
90
t/NamingConventions/Capitalization.run
@@ -150,41 +94,9 @@ my @TARGET_FILES = qw<
150
94
sub get_PL_files {
151
95
my %PL_files = map { ( " $_ .PL" => $_ ) } @TARGET_FILES ;
152
96
153
- $PL_files {' xt/author/generate_without_optional_dependencies_wrappers.PL' } =
154
- [ test_wrappers_to_generate() ];
155
-
156
97
return \%PL_files ;
157
98
}
158
99
159
- sub dump_unlisted_or_optional_module_versions {
160
- print
161
- " \n Versions of optional/unlisted/indirect dependencies:\n\n " ;
162
-
163
- my @unlisted_modules = (
164
- qw<
165
- > ,
166
- keys %{ { recommended_module_versions() } },
167
- );
168
-
169
- foreach my $module (sort @unlisted_modules ) {
170
- my $version ;
171
-
172
- eval " use $module ; \$ version = \$ ${module} ::VERSION;" ;
173
-
174
- if ($EVAL_ERROR ) {
175
- $version = ' not installed' ;
176
- } elsif (not defined $version ) {
177
- $version = ' undef' ;
178
- }
179
-
180
- print " $module = $version \n " ;
181
- }
182
-
183
- print " \n " ;
184
-
185
- return ;
186
- }
187
-
188
100
sub emit_tar_warning_if_necessary {
189
101
if ( os_is( qw< Solaris> ) ) {
190
102
print <<'END_OF_TAR_WARNING' ;
@@ -220,18 +132,6 @@ Various utilities used in assembling Perl::Critic, primary for use by
220
132
221
133
=over
222
134
223
- =item C<recommended_module_versions() >
224
-
225
- Returns a hash mapping between recommended (but not required) modules
226
- for Perl::Critic and the minimum version required of each module,
227
-
228
-
229
- =item C<test_wrappers_to_generate() >
230
-
231
- Returns a list of test wrappers to be generated by
232
- F<xt/author/generate_without_optional_dependencies_wrappers.PL> .
233
-
234
-
235
135
=item C<get_PL_files() >
236
136
237
137
Returns a reference to a hash with a mapping from the name of a .PL
0 commit comments