File Coverage

blib/lib/Perl/Critic/Exception/Configuration/NonExistentPolicy.pm
Criterion Covered Total %
statement 14 17 82.3
branch n/a
condition n/a
subroutine 5 6 83.3
pod 1 1 100.0
total 20 24 83.3


line stmt bran cond sub pod time code
1             package Perl::Critic::Exception::Configuration::NonExistentPolicy;
2              
3 40     40   707 use 5.010001;
  40         155  
4 40     40   263 use strict;
  40         98  
  40         793  
5 40     40   208 use warnings;
  40         339  
  40         1033  
6              
7 40     40   479 use Readonly;
  40         119  
  40         3535  
8              
9             our $VERSION = '1.150';
10              
11             #-----------------------------------------------------------------------------
12              
13             use Exception::Class (
14 40         459 '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     40   356 );
  40         93  
20              
21             #-----------------------------------------------------------------------------
22              
23             Readonly::Array our @EXPORT_OK => qw< throw_extra_parameter >;
24              
25             #-----------------------------------------------------------------------------
26              
27             sub full_message {
28 0     0 1   my ( $self ) = @_;
29              
30 0           my $policy = $self->policy();
31              
32 0           return qq<There is no $policy policy installed.>;
33             }
34              
35              
36             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 :