Build all packages removed dependencies of libtest-exception-perl libtest-warn-perl...
[dh-make-perl] / dev / i386 / libperl-critic-perl / libperl-critic-perl-1.088 / lib / Perl / Critic / Exception / Configuration / Option / Policy.pm
1 ##############################################################################
2 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/lib/Perl/Critic/Exception/Configuration/Option/Policy.pm $
3 #     $Date: 2008-07-03 10:19:10 -0500 (Thu, 03 Jul 2008) $
4 #   $Author: clonezone $
5 # $Revision: 2489 $
6 ##############################################################################
7
8 package Perl::Critic::Exception::Configuration::Option::Policy;
9
10 use 5.006001;
11 use strict;
12 use warnings;
13
14 use Perl::Critic::Utils qw{ &policy_short_name };
15
16 our $VERSION = '1.088';
17
18 #-----------------------------------------------------------------------------
19
20 use Exception::Class (
21     'Perl::Critic::Exception::Configuration::Option::Policy' => {
22         isa         => 'Perl::Critic::Exception::Configuration::Option',
23         description => 'A problem with the configuration of a policy.',
24         fields      => [ qw{ policy } ],
25     },
26 );
27
28 #-----------------------------------------------------------------------------
29
30 sub new {
31     my ($class, %options) = @_;
32
33     my $policy = $options{policy};
34     if ($policy) {
35         $options{policy} = policy_short_name($policy);
36     }
37
38     return $class->SUPER::new(%options);
39 }
40
41
42 1;
43
44 __END__
45
46 #-----------------------------------------------------------------------------
47
48 =pod
49
50 =for stopwords
51
52 =head1 NAME
53
54 Perl::Critic::Exception::Configuration::Option::Policy - A problem with configuration of a policy.
55
56 =head1 DESCRIPTION
57
58 A representation of a problem found with the configuration of a
59 L<Perl::Critic::Policy>, whether from a F<.perlcriticrc>, another
60 profile file, or command line.
61
62 This is an abstract class.  It should never be instantiated.
63
64
65 =head1 METHODS
66
67 =over
68
69 =item C<policy()>
70
71 The short name of the policy that had configuration problems.
72
73
74 =back
75
76
77 =head1 AUTHOR
78
79 Elliot Shank <perl@galumph.com>
80
81 =head1 COPYRIGHT
82
83 Copyright (c) 2007-2008 Elliot Shank.  All rights reserved.
84
85 This program is free software; you can redistribute it and/or modify
86 it under the same terms as Perl itself.  The full text of this license
87 can be found in the LICENSE file included with this module.
88
89 =cut
90
91 # Local Variables:
92 #   mode: cperl
93 #   cperl-indent-level: 4
94 #   fill-column: 78
95 #   indent-tabs-mode: nil
96 #   c-indentation-style: bsd
97 # End:
98 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :