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