Modified source files and compiled any and armel versions of packages
[pkg-perl] / deb-src / libperl-critic-perl / libperl-critic-perl-1.088 / lib / Perl / Critic / Exception / Configuration / Option / Global / ExtraParameter.pm
1 ##############################################################################
2 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/lib/Perl/Critic/Exception/Configuration/Option/Global/ExtraParameter.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::Global::ExtraParameter;
9
10 use 5.006001;
11 use strict;
12 use warnings;
13
14 use Readonly;
15
16 our $VERSION = '1.088';
17
18 #-----------------------------------------------------------------------------
19
20 use Exception::Class (
21     'Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter' => {
22         isa         => 'Perl::Critic::Exception::Configuration::Option::Global',
23         description => 'The configuration referred to a non-existant global option.',
24         alias       => 'throw_extra_global',
25     },
26 );
27
28 #-----------------------------------------------------------------------------
29
30 Readonly::Array our @EXPORT_OK => qw< throw_extra_global >;
31
32 #-----------------------------------------------------------------------------
33
34 sub full_message {
35     my ( $self ) = @_;
36
37     my $source = $self->source();
38     if ($source) {
39         $source = qq{ (found in "$source")};
40     }
41     else {
42         $source = q{};
43     }
44
45     my $option_name = $self->option_name();
46
47     return qq{"$option_name" is not a supported option$source.};
48 }
49
50
51 1;
52
53 __END__
54
55 #-----------------------------------------------------------------------------
56
57 =pod
58
59 =for stopwords
60
61 =head1 NAME
62
63 Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter - The configuration referred to a non-existent global option.
64
65 =head1 DESCRIPTION
66
67 A representation of the configuration attempting to specify a value
68 for an option that L<Perl::Critic> doesn't have, whether from a
69 F<.perlcriticrc>, another profile file, or command line.
70
71
72 =head1 CLASS METHODS
73
74 =over
75
76 =item C<< throw( option_name => $option_name, source => $source ) >>
77
78 See L<Exception::Class/"throw">.
79
80
81 =item C<< new( option_name => $option_name, source => $source ) >>
82
83 See L<Exception::Class/"new">.
84
85
86 =back
87
88
89 =head1 METHODS
90
91 =over
92
93 =item C<full_message()>
94
95 Provide a standard message for values for non-existent parameters for
96 policies.  See L<Exception::Class/"full_message">.
97
98
99 =back
100
101
102 =head1 AUTHOR
103
104 Elliot Shank <perl@galumph.com>
105
106 =head1 COPYRIGHT
107
108 Copyright (c) 2007-2008 Elliot Shank.  All rights reserved.
109
110 This program is free software; you can redistribute it and/or modify
111 it under the same terms as Perl itself.  The full text of this license
112 can be found in the LICENSE file included with this module.
113
114 =cut
115
116 # Local Variables:
117 #   mode: cperl
118 #   cperl-indent-level: 4
119 #   fill-column: 78
120 #   indent-tabs-mode: nil
121 #   c-indentation-style: bsd
122 # End:
123 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :