« lib/Perl/ToPerl6/Transformer/Instances/RewriteCreation.pm
↑ Summary
lib/Perl/ToPerl6/Statistics.pm »
| 1 | package Perl::ToPerl6::Exception::Configuration::Option::Transformer::ParameterValue; | ||||||||||||||||||||
| 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 | 25 | ▶ | use Perl::ToPerl6::Utils qw{ :characters }; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 25 | ▶ | use Exception::Class ( | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | 25 | 'Perl::ToPerl6::Exception::Configuration::Option::Transformer::ParameterValue' => { | |||||||||||||||||||
| 15 | isa => 'Perl::ToPerl6::Exception::Configuration::Option::Transformer', | ||||||||||||||||||||
| 16 | description => 'A problem with the value of a parameter for a transformer.', | ||||||||||||||||||||
| 17 | alias => 'throw_transformer_value', | ||||||||||||||||||||
| 18 | }, | ||||||||||||||||||||
| 19 | 25 | ); | |||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 25 | Readonly::Array our @EXPORT_OK => qw< throw_transformer_value >; | |||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 0 | ▶ | sub full_message { | ||||||||||||||||||
|
Subroutine
full_message: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||
| 28 | 0 | my ( $self ) = @_; | |||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 0 | my $source = $self->source(); | |||||||||||||||||||
| 31 | 0 | ▶ | if ($source) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 32 | 0 | $source = qq{ found in "$source"}; | |||||||||||||||||||
| 33 | } | ||||||||||||||||||||
| 34 | else { | ||||||||||||||||||||
| 35 | 0 | $source = $EMPTY; | |||||||||||||||||||
| 36 | } | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | 0 | my $transformer = $self->transformer(); | |||||||||||||||||||
| 39 | 0 | my $option_name = $self->option_name(); | |||||||||||||||||||
| 40 | 0 | ▶ | my $option_value = | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 41 | defined $self->option_value() | ||||||||||||||||||||
| 42 | ? $DQUOTE . $self->option_value() . $DQUOTE | ||||||||||||||||||||
| 43 | : '<undef>'; | ||||||||||||||||||||
| 44 | 0 | ▶ | my $message_suffix = $self->message_suffix() || $EMPTY; | ||||||||||||||||||
|
Condition0%0/3
$self->message_suffix || $Perl::ToPerl6::Exception::Configuration::Option::Transformer::ParameterValue::EMPTY
MC/DC0%0/2
$self->message_suffix || $Perl::ToPerl6::Exception::Configuration::Option::Transformer::ParameterValue::EMPTY
$self->message_suffix
$Perl::ToPerl6::Exception::Configuration::Option::Transformer::ParameterValue::EMPTY
Truth table0%0/3
A || B
A= $self->message_suffixB= $Perl::ToPerl6::Exception::Configuration::Option::Transformer::ParameterValue::EMPTY
| |||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | return | ||||||||||||||||||||
| 47 | 0 | qq{The value for the $transformer "$option_name" option } | |||||||||||||||||||
| 48 | . qq{($option_value)$source $message_suffix}; | ||||||||||||||||||||
| 49 | } | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | 25 | 1; | |||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | __END__ | ||||||||||||||||||||