line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Critic::Exception::Configuration::Option::Policy; |
2
|
|
|
|
|
|
|
|
3
|
40
|
|
|
40
|
|
26973
|
use 5.010001; |
|
40
|
|
|
|
|
187
|
|
4
|
40
|
|
|
40
|
|
281
|
use strict; |
|
40
|
|
|
|
|
109
|
|
|
40
|
|
|
|
|
884
|
|
5
|
40
|
|
|
40
|
|
230
|
use warnings; |
|
40
|
|
|
|
|
106
|
|
|
40
|
|
|
|
|
1225
|
|
6
|
|
|
|
|
|
|
|
7
|
40
|
|
|
40
|
|
249
|
use Perl::Critic::Utils qw{ &policy_short_name }; |
|
40
|
|
|
|
|
109
|
|
|
40
|
|
|
|
|
5766
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.146'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use Exception::Class ( |
14
|
40
|
|
|
|
|
448
|
'Perl::Critic::Exception::Configuration::Option::Policy' => { |
15
|
|
|
|
|
|
|
isa => 'Perl::Critic::Exception::Configuration::Option', |
16
|
|
|
|
|
|
|
description => 'A problem with the configuration of a policy.', |
17
|
|
|
|
|
|
|
fields => [ qw{ policy } ], |
18
|
|
|
|
|
|
|
}, |
19
|
40
|
|
|
40
|
|
327
|
); |
|
40
|
|
|
|
|
105
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub new { |
24
|
157
|
|
|
157
|
1
|
25112
|
my ($class, %options) = @_; |
25
|
|
|
|
|
|
|
|
26
|
157
|
|
|
|
|
373
|
my $policy = $options{policy}; |
27
|
157
|
100
|
|
|
|
422
|
if ($policy) { |
28
|
155
|
|
|
|
|
414
|
$options{policy} = policy_short_name($policy); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
157
|
|
|
|
|
730
|
return $class->SUPER::new(%options); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=pod |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=for stopwords |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 NAME |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Perl::Critic::Exception::Configuration::Option::Policy - A problem with configuration of a policy. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 DESCRIPTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
A representation of a problem found with the configuration of a |
52
|
|
|
|
|
|
|
L<Perl::Critic::Policy|Perl::Critic::Policy>, whether from a |
53
|
|
|
|
|
|
|
F<.perlcriticrc>, another profile file, or command line. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This is an abstract class. It should never be instantiated. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 INTERFACE SUPPORT |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
This is considered to be a public class. Any changes to its interface |
61
|
|
|
|
|
|
|
will go through a deprecation cycle. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 METHODS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=over |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item C<policy()> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
The short name of the policy that had configuration problems. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=back |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 AUTHOR |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Elliot Shank <perl@galumph.com> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 COPYRIGHT |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Copyright (c) 2007-2011 Elliot Shank. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
85
|
|
|
|
|
|
|
it under the same terms as Perl itself. The full text of this license |
86
|
|
|
|
|
|
|
can be found in the LICENSE file included with this module. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=cut |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
# Local Variables: |
91
|
|
|
|
|
|
|
# mode: cperl |
92
|
|
|
|
|
|
|
# cperl-indent-level: 4 |
93
|
|
|
|
|
|
|
# fill-column: 78 |
94
|
|
|
|
|
|
|
# indent-tabs-mode: nil |
95
|
|
|
|
|
|
|
# c-indentation-style: bsd |
96
|
|
|
|
|
|
|
# End: |
97
|
|
|
|
|
|
|
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround : |