« lib/Perl/Critic/Exception/Configuration/Option/Global/ExtraParameter.pm
↑ Summary
lib/Perl/Critic/Exception/Configuration/Option/Policy.pm »
| 1 | package Perl::Critic::Exception::Configuration::Option::Policy::ExtraParameter; | ||||||||||
| 2 | |||||||||||
| 3 | 40 | ▶ | use 5.010001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 40 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 40 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 40 | ▶ | use Readonly; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 40 | our $VERSION = '1.156'; | |||||||||
| 10 | |||||||||||
| 11 | #----------------------------------------------------------------------------- | ||||||||||
| 12 | |||||||||||
| 13 | 40 | ▶ | use Exception::Class ( | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 40 | 'Perl::Critic::Exception::Configuration::Option::Policy::ExtraParameter' => { | |||||||||
| 15 | isa => 'Perl::Critic::Exception::Configuration::Option::Policy', | ||||||||||
| 16 | description => 'The configuration of a policy referred to a non-existent parameter.', | ||||||||||
| 17 | alias => 'throw_extra_parameter', | ||||||||||
| 18 | }, | ||||||||||
| 19 | 40 | ); | |||||||||
| 20 | |||||||||||
| 21 | #----------------------------------------------------------------------------- | ||||||||||
| 22 | |||||||||||
| 23 | 40 | Readonly::Array our @EXPORT_OK => qw< throw_extra_parameter >; | |||||||||
| 24 | |||||||||||
| 25 | #----------------------------------------------------------------------------- | ||||||||||
| 26 | |||||||||||
| 27 | 145 | ▶ | sub full_message { | ||||||||
|
Subroutine
full_message: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 28 | 145 | my ( $self ) = @_; | |||||||||
| 29 | |||||||||||
| 30 | 145 | my $source = $self->source(); | |||||||||
| 31 | 145 | ▶ | if ($source) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | 0 | $source = qq{ (found in "$source")}; | |||||||||
| 33 | } | ||||||||||
| 34 | else { | ||||||||||
| 35 | 145 | $source = q{}; | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 145 | my $policy = $self->policy(); | |||||||||
| 39 | 145 | my $option_name = $self->option_name(); | |||||||||
| 40 | |||||||||||
| 41 | return | ||||||||||
| 42 | 145 | qq{The $policy policy doesn't take a "$option_name" option$source.}; | |||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | |||||||||||
| 46 | 40 | 1; | |||||||||
| 47 | |||||||||||
| 48 | __END__ | ||||||||||