blib/lib/Perl/Critic/Exception/Configuration/NonExistentPolicy.pm

filter: Statementstmt 85.0% 17 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 85.1% 23 / 27 CC 1 SCAR 1.5
CC
1
Cov
85%
full_message
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/Perl/Critic/Policy/ValuesAndExpressions/ProhibitEscapedCharacters.pm ↑ Summary blib/lib/Perl/Critic/Policy/ControlStructures/ProhibitUnlessBlocks.pm »
1 package Perl::Critic::Exception::Configuration::NonExistentPolicy;
2  
3 40 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 40 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 40 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 40 ▶use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 40 our $VERSION = '1.150';
10  
11 #-----------------------------------------------------------------------------
12  
13 use Exception::Class (
14 40 'Perl::Critic::Exception::Configuration::NonExistentPolicy' => {
15 isa => 'Perl::Critic::Exception::Configuration',
16 description => 'The configuration referred to a non-existent policy.',
17 fields => [ qw{ policy } ],
18 },
19 40 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 #-----------------------------------------------------------------------------
22  
23 40 Readonly::Array our @EXPORT_OK => qw< throw_extra_parameter >;
24  
25 #-----------------------------------------------------------------------------
26  
27 sub full_message {
28 0 ▶ my ( $self ) = @_;
Subroutine full_message: not called CC=1 SCAR=6.9
Pod documented
29  
30 0 my $policy = $self->policy();
31  
32 0 return qq<There is no $policy policy installed.>;
33 }
34  
35  
36 40 1;
37  
38 __END__
39  
40 #-----------------------------------------------------------------------------
41  
42 =pod
43  
44 =for stopwords
45  
46 =head1 NAME
47  
48 Perl::Critic::Exception::Configuration::NonExistentPolicy - The configuration referred to a non-existent policy.
49  
50 =head1 DESCRIPTION
51  
52 A representation of the configuration attempting to specify a
53 L<Perl::Critic::Policy|Perl::Critic::Policy> that is not known, whether from a
54 F<.perlcriticrc>, another profile file, or command line.
55  
56  
57 =head1 INTERFACE SUPPORT
58  
59 This is considered to be a public class. Any changes to its interface
60 will go through a deprecation cycle.
61  
62  
63 =head1 CLASS METHODS
64  
65 =over
66  
67 =item C<< throw( policy => $policy ) >>
68  
69 See L<Exception::Class/"throw">.
70  
71  
72 =item C<< new( policy => $policy ) >>
73  
74 See L<Exception::Class/"new">.
75  
76  
77 =back
78  
79  
80 =head1 METHODS
81  
82 =over
83  
84 =item C<full_message()>
85  
86 Provide a standard message. See L<Exception::Class/"full_message">.
87  
88  
89 =back
90  
91  
92 =head1 AUTHOR
93  
94 Elliot Shank <perl@galumph.com>
95  
96 =head1 COPYRIGHT
97  
98 Copyright (c) 2007-2011 Elliot Shank.
99  
100 This program is free software; you can redistribute it and/or modify
101 it under the same terms as Perl itself. The full text of this license
102 can be found in the LICENSE file included with this module.
103  
104 =cut
105  
106 # Local Variables:
107 # mode: cperl
108 # cperl-indent-level: 4
109 # fill-column: 78
110 # indent-tabs-mode: nil
111 # c-indentation-style: bsd
112 # End:
113 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :
« blib/lib/Perl/Critic/Policy/ValuesAndExpressions/ProhibitEscapedCharacters.pm ↑ Summary blib/lib/Perl/Critic/Policy/ControlStructures/ProhibitUnlessBlocks.pm »