1 ##############################################################################
2 # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/lib/Perl/Critic/Exception/Configuration/Option.pm $
3 # $Date: 2008-07-03 10:19:10 -0500 (Thu, 03 Jul 2008) $
6 ##############################################################################
8 package Perl::Critic::Exception::Configuration::Option;
14 our $VERSION = '1.088';
16 #-----------------------------------------------------------------------------
18 use Perl::Critic::Exception::Fatal::Internal;
20 use Exception::Class ( # this must come after "use P::C::Exception::*"
21 'Perl::Critic::Exception::Configuration::Option' => {
22 isa => 'Perl::Critic::Exception::Configuration',
23 description => 'A problem with an option in the Perl::Critic configuration, whether from a file or a command line or some other source.',
24 fields => [ qw{ option_name option_value message_suffix } ],
28 #-----------------------------------------------------------------------------
33 return $self->full_message();
36 #-----------------------------------------------------------------------------
41 return $self->full_message();
44 #-----------------------------------------------------------------------------
46 ## no critic (Subroutines::RequireFinalReturn)
48 Perl::Critic::Exception::Fatal::Internal->throw(
49 'Subclass failed to override abstract method.'
59 #-----------------------------------------------------------------------------
67 Perl::Critic::Exception::Configuration::Option - A problem with an option in the L<Perl::Critic> configuration.
71 A representation of a problem found with an option in the
72 configuration of L<Perl::Critic>, whether from a F<.perlcriticrc>,
73 another profile file, or command line.
75 This is an abstract class. It should never be instantiated.
82 =item C<option_name()>
84 The name of the option that was found to be in error.
87 =item C<option_value()>
89 The value of the option that was found to be in error.
92 =item C<message_suffix()>
94 Any text that should be applied to end of the standard message for
95 this kind of exception.
102 Overridden to call C<full_message()>. I.e. any message string in the
103 superclass is ignored.
106 =item C<full_message()>
108 Overridden to turn it into an abstract method to force subclasses to
117 L<Perl::Critic::Exception::Configuration::Option::Global>
118 L<Perl::Critic::Exception::Configuration::Option::Policy>
123 Elliot Shank <perl@galumph.com>
127 Copyright (c) 2007-2008 Elliot Shank. All rights reserved.
129 This program is free software; you can redistribute it and/or modify
130 it under the same terms as Perl itself. The full text of this license
131 can be found in the LICENSE file included with this module.
137 # cperl-indent-level: 4
139 # indent-tabs-mode: nil
140 # c-indentation-style: bsd
142 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :