1 ##############################################################################
2 # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/lib/Perl/Critic/Exception/Configuration/Option/Policy/ParameterValue.pm $
3 # $Date: 2008-07-03 10:19:10 -0500 (Thu, 03 Jul 2008) $
6 ##############################################################################
8 package Perl::Critic::Exception::Configuration::Option::Policy::ParameterValue;
16 use Perl::Critic::Utils qw{ :characters };
18 our $VERSION = '1.088';
20 #-----------------------------------------------------------------------------
22 use Exception::Class (
23 'Perl::Critic::Exception::Configuration::Option::Policy::ParameterValue' => {
24 isa => 'Perl::Critic::Exception::Configuration::Option::Policy',
25 description => 'A problem with the value of a parameter for a policy.',
26 alias => 'throw_policy_value',
30 #-----------------------------------------------------------------------------
32 Readonly::Array our @EXPORT_OK => qw< throw_policy_value >;
34 #-----------------------------------------------------------------------------
39 my $source = $self->source();
41 $source = qq{ found in "$source"};
47 my $policy = $self->policy();
48 my $option_name = $self->option_name();
50 defined $self->option_value()
51 ? $DQUOTE . $self->option_value() . $DQUOTE
53 my $message_suffix = $self->message_suffix() || $EMPTY;
56 qq{The value for the $policy "$option_name" option }
57 . qq{($option_value)$source $message_suffix};
65 #-----------------------------------------------------------------------------
73 Perl::Critic::Exception::Configuration::Option::Policy::ParameterValue - A problem with the value of a parameter for a policy.
77 A representation of a problem found with the value of a parameter for a
78 L<Perl::Critic::Policy>, whether from a F<.perlcriticrc>, another
79 profile file, or command line.
86 =item C<< throw( policy => $policy, option_name => $option_name, option_value => $option_value, source => $source, message_suffix => $message_suffix ) >>
88 See L<Exception::Class/"throw">.
91 =item C<< new( policy => $policy, option_name => $option_name, option_value => $option_value, source => $source, message_suffix => $message_suffix ) >>
93 See L<Exception::Class/"new">.
103 =item C<full_message()>
105 Provide a standard message for policy parameter value problems. See
106 L<Exception::Class/"full_message">.
114 Elliot Shank <perl@galumph.com>
118 Copyright (c) 2007-2008 Elliot Shank. All rights reserved.
120 This program is free software; you can redistribute it and/or modify
121 it under the same terms as Perl itself. The full text of this license
122 can be found in the LICENSE file included with this module.
128 # cperl-indent-level: 4
130 # indent-tabs-mode: nil
131 # c-indentation-style: bsd
133 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :