1 ##############################################################################
2 # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/lib/Perl/Critic/Exception/Configuration/Option/Policy/ExtraParameter.pm $
3 # $Date: 2008-07-03 10:19:10 -0500 (Thu, 03 Jul 2008) $
6 ##############################################################################
8 package Perl::Critic::Exception::Configuration::Option::Policy::ExtraParameter;
16 our $VERSION = '1.088';
18 #-----------------------------------------------------------------------------
20 use Exception::Class (
21 'Perl::Critic::Exception::Configuration::Option::Policy::ExtraParameter' => {
22 isa => 'Perl::Critic::Exception::Configuration::Option::Policy',
23 description => 'The configuration of a policy referred to a non-existant parameter.',
24 alias => 'throw_extra_parameter',
28 #-----------------------------------------------------------------------------
30 Readonly::Array our @EXPORT_OK => qw< throw_extra_parameter >;
32 #-----------------------------------------------------------------------------
37 my $source = $self->source();
39 $source = qq{ (found in "$source")};
45 my $policy = $self->policy();
46 my $option_name = $self->option_name();
49 qq{The $policy policy doesn't take a "$option_name" option$source.};
57 #-----------------------------------------------------------------------------
65 Perl::Critic::Exception::Configuration::Option::Policy::ExtraParameter - The configuration referred to a non-existent parameter for a policy.
69 A representation of the configuration attempting to specify a value
70 for a parameter that a L<Perl::Critic::Policy> doesn't have, whether
71 from a F<.perlcriticrc>, another profile file, or command line.
78 =item C<< throw( policy => $policy, option_name => $option_name, source => $source ) >>
80 See L<Exception::Class/"throw">.
83 =item C<< new( policy => $policy, option_name => $option_name, source => $source ) >>
85 See L<Exception::Class/"new">.
95 =item C<full_message()>
97 Provide a standard message for values for non-existent parameters for
98 policies. See L<Exception::Class/"full_message">.
106 Elliot Shank <perl@galumph.com>
110 Copyright (c) 2007-2008 Elliot Shank. All rights reserved.
112 This program is free software; you can redistribute it and/or modify
113 it under the same terms as Perl itself. The full text of this license
114 can be found in the LICENSE file included with this module.
120 # cperl-indent-level: 4
122 # indent-tabs-mode: nil
123 # c-indentation-style: bsd
125 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :