line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Critic::OptionsProcessor; |
2
|
|
|
|
|
|
|
|
3
|
40
|
|
|
40
|
|
5798
|
use 5.010001; |
|
40
|
|
|
|
|
179
|
|
4
|
40
|
|
|
40
|
|
260
|
use strict; |
|
40
|
|
|
|
|
110
|
|
|
40
|
|
|
|
|
882
|
|
5
|
40
|
|
|
40
|
|
227
|
use warnings; |
|
40
|
|
|
|
|
120
|
|
|
40
|
|
|
|
|
1304
|
|
6
|
|
|
|
|
|
|
|
7
|
40
|
|
|
40
|
|
290
|
use English qw(-no_match_vars); |
|
40
|
|
|
|
|
119
|
|
|
40
|
|
|
|
|
288
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
17758
|
use Perl::Critic::Exception::AggregateConfiguration; |
|
40
|
|
|
|
|
128
|
|
|
40
|
|
|
|
|
1845
|
|
10
|
40
|
|
|
40
|
|
19910
|
use Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter; |
|
40
|
|
|
|
|
136
|
|
|
40
|
|
|
|
|
2619
|
|
11
|
40
|
|
|
|
|
2091
|
use Perl::Critic::Utils qw< |
12
|
|
|
|
|
|
|
:booleans :characters :severities :data_conversion $DEFAULT_VERBOSITY |
13
|
40
|
|
|
40
|
|
366
|
>; |
|
40
|
|
|
|
|
128
|
|
14
|
40
|
|
|
|
|
5775
|
use Perl::Critic::Utils::Constants qw< |
15
|
|
|
|
|
|
|
$PROFILE_STRICTNESS_DEFAULT |
16
|
|
|
|
|
|
|
:color_severity |
17
|
40
|
|
|
40
|
|
17265
|
>; |
|
40
|
|
|
|
|
113
|
|
18
|
40
|
|
|
40
|
|
17659
|
use Perl::Critic::Utils::DataConversion qw< dor >; |
|
40
|
|
|
|
|
149
|
|
|
40
|
|
|
|
|
786
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '1.146'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new { |
25
|
3091
|
|
|
3091
|
1
|
18969
|
my ($class, %args) = @_; |
26
|
3091
|
|
|
|
|
7524
|
my $self = bless {}, $class; |
27
|
3091
|
|
|
|
|
11000
|
$self->_init( %args ); |
28
|
3090
|
|
|
|
|
10409
|
return $self; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _init { |
34
|
3091
|
|
|
3091
|
|
7677
|
my ( $self, %args ) = @_; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# Multi-value defaults |
37
|
3091
|
|
|
|
|
12487
|
my $exclude = dor(delete $args{exclude}, $EMPTY); |
38
|
3091
|
|
|
|
|
11685
|
$self->{_exclude} = [ words_from_string( $exclude ) ]; |
39
|
|
|
|
|
|
|
|
40
|
3091
|
|
|
|
|
9615
|
my $include = dor(delete $args{include}, $EMPTY); |
41
|
3091
|
|
|
|
|
8684
|
$self->{_include} = [ words_from_string( $include ) ]; |
42
|
|
|
|
|
|
|
|
43
|
3091
|
|
|
|
|
9272
|
my $program_extensions = dor(delete $args{'program-extensions'}, $EMPTY); |
44
|
3091
|
|
|
|
|
6585
|
$self->{_program_extensions} = [ words_from_string( $program_extensions) ]; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# Single-value defaults |
47
|
3091
|
|
|
|
|
8991
|
$self->{_force} = dor(delete $args{force}, $FALSE); |
48
|
3091
|
|
|
|
|
7930
|
$self->{_only} = dor(delete $args{only}, $FALSE); |
49
|
|
|
|
|
|
|
$self->{_profile_strictness} = |
50
|
3091
|
|
|
|
|
7924
|
dor(delete $args{'profile-strictness'}, $PROFILE_STRICTNESS_DEFAULT); |
51
|
3091
|
|
|
|
|
8012
|
$self->{_single_policy} = dor(delete $args{'single-policy'}, $EMPTY); |
52
|
3091
|
|
|
|
|
8765
|
$self->{_severity} = dor(delete $args{severity}, $SEVERITY_HIGHEST); |
53
|
3091
|
|
|
|
|
8692
|
$self->{_theme} = dor(delete $args{theme}, $EMPTY); |
54
|
3091
|
|
|
|
|
8911
|
$self->{_top} = dor(delete $args{top}, $FALSE); |
55
|
3091
|
|
|
|
|
9051
|
$self->{_verbose} = dor(delete $args{verbose}, $DEFAULT_VERBOSITY); |
56
|
3091
|
|
|
|
|
7974
|
$self->{_criticism_fatal} = dor(delete $args{'criticism-fatal'}, $FALSE); |
57
|
3091
|
|
|
|
|
8218
|
$self->{_pager} = dor(delete $args{pager}, $EMPTY); |
58
|
3091
|
|
|
|
|
7941
|
$self->{_allow_unsafe} = dor(delete $args{'allow-unsafe'}, $FALSE); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
$self->{_color_severity_highest} = dor( |
61
|
|
|
|
|
|
|
delete $args{'color-severity-highest'}, |
62
|
|
|
|
|
|
|
delete $args{'colour-severity-highest'}, |
63
|
|
|
|
|
|
|
delete $args{'color-severity-5'}, |
64
|
3091
|
|
|
|
|
10512
|
delete $args{'colour-severity-5'}, |
65
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_HIGHEST_DEFAULT, |
66
|
|
|
|
|
|
|
); |
67
|
|
|
|
|
|
|
$self->{_color_severity_high} = dor( |
68
|
|
|
|
|
|
|
delete $args{'color-severity-high'}, |
69
|
|
|
|
|
|
|
delete $args{'colour-severity-high'}, |
70
|
|
|
|
|
|
|
delete $args{'color-severity-4'}, |
71
|
3091
|
|
|
|
|
9156
|
delete $args{'colour-severity-4'}, |
72
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_HIGH_DEFAULT, |
73
|
|
|
|
|
|
|
); |
74
|
|
|
|
|
|
|
$self->{_color_severity_medium} = dor( |
75
|
|
|
|
|
|
|
delete $args{'color-severity-medium'}, |
76
|
|
|
|
|
|
|
delete $args{'colour-severity-medium'}, |
77
|
|
|
|
|
|
|
delete $args{'color-severity-3'}, |
78
|
3091
|
|
|
|
|
10333
|
delete $args{'colour-severity-3'}, |
79
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_MEDIUM_DEFAULT, |
80
|
|
|
|
|
|
|
); |
81
|
|
|
|
|
|
|
$self->{_color_severity_low} = dor( |
82
|
|
|
|
|
|
|
delete $args{'color-severity-low'}, |
83
|
|
|
|
|
|
|
delete $args{'colour-severity-low'}, |
84
|
|
|
|
|
|
|
delete $args{'color-severity-2'}, |
85
|
3091
|
|
|
|
|
10730
|
delete $args{'colour-severity-2'}, |
86
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_LOW_DEFAULT, |
87
|
|
|
|
|
|
|
); |
88
|
|
|
|
|
|
|
$self->{_color_severity_lowest} = dor( |
89
|
|
|
|
|
|
|
delete $args{'color-severity-lowest'}, |
90
|
|
|
|
|
|
|
delete $args{'colour-severity-lowest'}, |
91
|
|
|
|
|
|
|
delete $args{'color-severity-1'}, |
92
|
3091
|
|
|
|
|
11009
|
delete $args{'colour-severity-1'}, |
93
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_LOWEST_DEFAULT, |
94
|
|
|
|
|
|
|
); |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
# If we're using a pager or not outputing to a tty don't use colors. |
97
|
|
|
|
|
|
|
# Can't use IO::Interactive here because we /don't/ want to check STDIN. |
98
|
3091
|
50
|
66
|
|
|
10648
|
my $default_color = ($self->pager() or not -t *STDOUT) ? $FALSE : $TRUE; ## no critic (ProhibitInteractiveTest) |
99
|
3091
|
|
|
|
|
15288
|
$self->{_color} = dor(delete $args{color}, delete $args{colour}, $default_color); |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
# If there's anything left, complain. |
102
|
3091
|
|
|
|
|
11604
|
_check_for_extra_options(%args); |
103
|
|
|
|
|
|
|
|
104
|
3090
|
|
|
|
|
6570
|
return $self; |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
sub _check_for_extra_options { |
110
|
3091
|
|
|
3091
|
|
6545
|
my %args = @_; |
111
|
|
|
|
|
|
|
|
112
|
3091
|
100
|
|
|
|
12211
|
if ( my @remaining = sort keys %args ){ |
113
|
1
|
|
|
|
|
14
|
my $errors = Perl::Critic::Exception::AggregateConfiguration->new(); |
114
|
|
|
|
|
|
|
|
115
|
1
|
|
|
|
|
980
|
foreach my $option_name (@remaining) { |
116
|
2
|
|
|
|
|
67
|
$errors->add_exception( |
117
|
|
|
|
|
|
|
Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter->new( |
118
|
|
|
|
|
|
|
option_name => $option_name, |
119
|
|
|
|
|
|
|
) |
120
|
|
|
|
|
|
|
) |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
1
|
|
|
|
|
16
|
$errors->rethrow(); |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
3090
|
|
|
|
|
7606
|
return; |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
130
|
|
|
|
|
|
|
# Public ACCESSOR methods |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub severity { |
133
|
2856
|
|
|
2856
|
1
|
5781
|
my ($self) = @_; |
134
|
2856
|
|
|
|
|
7368
|
return $self->{_severity}; |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
sub theme { |
140
|
2871
|
|
|
2871
|
1
|
6687
|
my ($self) = @_; |
141
|
2871
|
|
|
|
|
7247
|
return $self->{_theme}; |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
sub exclude { |
147
|
2923
|
|
|
2923
|
1
|
6552
|
my ($self) = @_; |
148
|
2923
|
|
|
|
|
9171
|
return $self->{_exclude}; |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
sub include { |
154
|
2923
|
|
|
2923
|
1
|
6585
|
my ($self) = @_; |
155
|
2923
|
|
|
|
|
11301
|
return $self->{_include}; |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
sub only { |
161
|
2917
|
|
|
2917
|
1
|
5679
|
my ($self) = @_; |
162
|
2917
|
|
|
|
|
10411
|
return $self->{_only}; |
163
|
|
|
|
|
|
|
} |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
sub profile_strictness { |
168
|
2921
|
|
|
2921
|
1
|
6095
|
my ($self) = @_; |
169
|
2921
|
|
|
|
|
9386
|
return $self->{_profile_strictness}; |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
sub single_policy { |
175
|
2921
|
|
|
2921
|
1
|
7194
|
my ($self) = @_; |
176
|
2921
|
|
|
|
|
10631
|
return $self->{_single_policy}; |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
sub verbose { |
182
|
2923
|
|
|
2923
|
1
|
6293
|
my ($self) = @_; |
183
|
2923
|
|
|
|
|
9241
|
return $self->{_verbose}; |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
sub color { |
189
|
2924
|
|
|
2924
|
1
|
6698
|
my ($self) = @_; |
190
|
2924
|
|
|
|
|
9019
|
return $self->{_color}; |
191
|
|
|
|
|
|
|
} |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
sub pager { |
196
|
6014
|
|
|
6014
|
1
|
11842
|
my ($self) = @_; |
197
|
6014
|
|
|
|
|
47739
|
return $self->{_pager}; |
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
sub allow_unsafe { |
203
|
2917
|
|
|
2917
|
1
|
5783
|
my ($self) = @_; |
204
|
2917
|
|
|
|
|
9610
|
return $self->{_allow_unsafe}; |
205
|
|
|
|
|
|
|
} |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
sub criticism_fatal { |
210
|
2921
|
|
|
2921
|
1
|
5878
|
my ($self) = @_; |
211
|
2921
|
|
|
|
|
9414
|
return $self->{_criticism_fatal}; |
212
|
|
|
|
|
|
|
} |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
sub force { |
217
|
2917
|
|
|
2917
|
1
|
6701
|
my ($self) = @_; |
218
|
2917
|
|
|
|
|
11494
|
return $self->{_force}; |
219
|
|
|
|
|
|
|
} |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
sub top { |
224
|
2921
|
|
|
2921
|
1
|
6275
|
my ($self) = @_; |
225
|
2921
|
|
|
|
|
8503
|
return $self->{_top}; |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
sub color_severity_highest { |
231
|
2926
|
|
|
2926
|
1
|
6401
|
my ($self) = @_; |
232
|
2926
|
|
|
|
|
12706
|
return $self->{_color_severity_highest}; |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
sub color_severity_high { |
238
|
2926
|
|
|
2926
|
1
|
6679
|
my ($self) = @_; |
239
|
2926
|
|
|
|
|
11219
|
return $self->{_color_severity_high}; |
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
sub color_severity_medium { |
245
|
2926
|
|
|
2926
|
1
|
6501
|
my ($self) = @_; |
246
|
2926
|
|
|
|
|
11031
|
return $self->{_color_severity_medium}; |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
sub color_severity_low { |
252
|
2926
|
|
|
2926
|
1
|
8537
|
my ($self) = @_; |
253
|
2926
|
|
|
|
|
10795
|
return $self->{_color_severity_low}; |
254
|
|
|
|
|
|
|
} |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
sub color_severity_lowest { |
259
|
2926
|
|
|
2926
|
1
|
6516
|
my ($self) = @_; |
260
|
2926
|
|
|
|
|
10316
|
return $self->{_color_severity_lowest}; |
261
|
|
|
|
|
|
|
} |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
sub program_extensions { |
266
|
2923
|
|
|
2923
|
1
|
5372
|
my ($self) = @_; |
267
|
2923
|
|
|
|
|
6700
|
return $self->{_program_extensions}; |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
1; |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
__END__ |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
=pod |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
=head1 NAME |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
Perl::Critic::OptionsProcessor - The global configuration default values, combined with command-line values. |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
=head1 DESCRIPTION |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
This is a helper class that encapsulates the default parameters for |
288
|
|
|
|
|
|
|
constructing a L<Perl::Critic::Config|Perl::Critic::Config> object. |
289
|
|
|
|
|
|
|
There are no user-serviceable parts here. |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
=head1 INTERFACE SUPPORT |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
This is considered to be a non-public class. Its interface is subject |
295
|
|
|
|
|
|
|
to change without notice. |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
=over |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
=item C< new( %DEFAULT_PARAMS ) > |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
Returns a reference to a new C<Perl::Critic::OptionsProcessor> object. |
305
|
|
|
|
|
|
|
You can override the coded defaults by passing in name-value pairs |
306
|
|
|
|
|
|
|
that correspond to the methods listed below. |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
This is usually only invoked by |
309
|
|
|
|
|
|
|
L<Perl::Critic::UserProfile|Perl::Critic::UserProfile>, which passes |
310
|
|
|
|
|
|
|
in the global values from a F<.perlcriticrc> file. This object |
311
|
|
|
|
|
|
|
contains no information for individual Policies. |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
=back |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
=head1 METHODS |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
=over |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
=item C< exclude() > |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
Returns a reference to a list of the default exclusion patterns. If |
322
|
|
|
|
|
|
|
onto by |
323
|
|
|
|
|
|
|
L<Perl::Critic::PolicyParameter|Perl::Critic::PolicyParameter>. there |
324
|
|
|
|
|
|
|
are no default exclusion patterns, then the list will be empty. |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
=item C< force() > |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
Returns the default value of the C<force> flag (Either 1 or 0). |
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
=item C< include() > |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
Returns a reference to a list of the default inclusion patterns. If |
335
|
|
|
|
|
|
|
there are no default exclusion patterns, then the list will be empty. |
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
=item C< only() > |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
Returns the default value of the C<only> flag (Either 1 or 0). |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
=item C< profile_strictness() > |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
Returns the default value of C<profile_strictness> as an unvalidated |
346
|
|
|
|
|
|
|
string. |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
=item C< single_policy() > |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
Returns the default C<single-policy> pattern. (As a string.) |
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
=item C< severity() > |
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
Returns the default C<severity> setting. (1..5). |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
=item C< theme() > |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
Returns the default C<theme> setting. (As a string). |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
=item C< top() > |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
Returns the default C<top> setting. (Either 0 or a positive integer). |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
=item C< verbose() > |
370
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
Returns the default C<verbose> setting. (Either a number or format |
372
|
|
|
|
|
|
|
string). |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
=item C< color() > |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
Returns the default C<color> setting. (Either 1 or 0). |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
=item C< pager() > |
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
Returns the default C<pager> setting. (Either empty string or the pager |
383
|
|
|
|
|
|
|
command string). |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
=item C< allow_unsafe() > |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
Returns the default C<allow-unsafe> setting. (Either 1 or 0). |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
=item C< criticism_fatal() > |
392
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
Returns the default C<criticism-fatal> setting (Either 1 or 0). |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
=item C< color_severity_highest() > |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
Returns the color to be used for coloring highest severity violations. |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
=item C< color_severity_high() > |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
Returns the color to be used for coloring high severity violations. |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
=item C< color_severity_medium() > |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
Returns the color to be used for coloring medium severity violations. |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
=item C< color_severity_low() > |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
Returns the color to be used for coloring low severity violations. |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
=item C< color_severity_lowest() > |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
Returns the color to be used for coloring lowest severity violations. |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
=item C< program_extensions() > |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
Returns a reference to the array of file name extensions to be interpreted as |
418
|
|
|
|
|
|
|
representing Perl programs. |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
=back |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
=head1 SEE ALSO |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
L<Perl::Critic::Config|Perl::Critic::Config>, |
426
|
|
|
|
|
|
|
L<Perl::Critic::UserProfile|Perl::Critic::UserProfile> |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
=head1 AUTHOR |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
=head1 COPYRIGHT |
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved. |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
439
|
|
|
|
|
|
|
it under the same terms as Perl itself. The full text of this license |
440
|
|
|
|
|
|
|
can be found in the LICENSE file included with this module. |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
=cut |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
# Local Variables: |
445
|
|
|
|
|
|
|
# mode: cperl |
446
|
|
|
|
|
|
|
# cperl-indent-level: 4 |
447
|
|
|
|
|
|
|
# fill-column: 78 |
448
|
|
|
|
|
|
|
# indent-tabs-mode: nil |
449
|
|
|
|
|
|
|
# c-indentation-style: bsd |
450
|
|
|
|
|
|
|
# End: |
451
|
|
|
|
|
|
|
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround : |