1 ##############################################################################
2 # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/lib/Perl/Critic/Exception/Configuration/Option/Global/ParameterValue.pm $
3 # $Date: 2008-07-03 10:19:10 -0500 (Thu, 03 Jul 2008) $
6 ##############################################################################
8 package Perl::Critic::Exception::Configuration::Option::Global::ParameterValue;
16 use Perl::Critic::Utils qw{ :characters };
18 our $VERSION = '1.088';
20 #-----------------------------------------------------------------------------
22 use Exception::Class (
23 'Perl::Critic::Exception::Configuration::Option::Global::ParameterValue' => {
24 isa => 'Perl::Critic::Exception::Configuration::Option::Global',
25 description => 'A problem with the value of a global parameter.',
26 alias => 'throw_global_value',
30 #-----------------------------------------------------------------------------
32 Readonly::Array our @EXPORT_OK => qw< throw_global_value >;
34 #-----------------------------------------------------------------------------
39 my $source = $self->source();
41 $source = qq{ found in "$source"};
47 my $option_name = $self->option_name();
49 defined $self->option_value()
50 ? $DQUOTE . $self->option_value() . $DQUOTE
52 my $message_suffix = $self->message_suffix() || $EMPTY;
55 qq{The value for the global "$option_name" option }
56 . qq{($option_value)$source $message_suffix};
64 #-----------------------------------------------------------------------------
72 Perl::Critic::Exception::Configuration::Option::Global::ParameterValue - A problem with the value of a global parameter.
76 A representation of a problem found with the value of a global
77 parameter, whether from a F<.perlcriticrc>, another profile file, or
85 =item C<< throw( option_name => $option_name, option_value => $option_value, source => $source, message_suffix => $message_suffix ) >>
87 See L<Exception::Class/"throw">.
90 =item C<< new( option_name => $option_name, option_value => $option_value, source => $source, message_suffix => $message_suffix ) >>
92 See L<Exception::Class/"new">.
102 =item C<full_message()>
104 Provide a standard message for global configuration problems. See
105 L<Exception::Class/"full_message">.
113 Elliot Shank <perl@galumph.com>
117 Copyright (c) 2007-2008 Elliot Shank. All rights reserved.
119 This program is free software; you can redistribute it and/or modify
120 it under the same terms as Perl itself. The full text of this license
121 can be found in the LICENSE file included with this module.
127 # cperl-indent-level: 4
129 # indent-tabs-mode: nil
130 # c-indentation-style: bsd
132 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :