lib/Perl/ToPerl6/Exception/Configuration/Option/Global/ParameterValue.pm

filter: Statementstmt 100% 28 / 28 Branchbran 75.0% 3 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 88.8% 40 / 45 CC 4 SCAR 8.1
CC
4
Cov
91%
full_message
4.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« lib/Perl/ToPerl6/Transformer/CompoundStatements/SwapForArguments.pm ↑ Summary lib/Perl/ToPerl6/Transformer/Pragmas/RewritePragmas.pm »
1 package Perl::ToPerl6::Exception::Configuration::Option::Global::ParameterValue;
2  
3 13 ▶use 5.006001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 13 ▶use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 13 ▶use Perl::ToPerl6::Utils qw{ :characters };
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 #-----------------------------------------------------------------------------
12  
13 13 ▶use Exception::Class (
Subroutine BEGIN: called CC=1 SCAR=0.0
14 13 'Perl::ToPerl6::Exception::Configuration::Option::Global::ParameterValue' => {
15 isa => 'Perl::ToPerl6::Exception::Configuration::Option::Global',
16 description => 'A problem with the value of a global parameter.',
17 alias => 'throw_global_value',
18 },
19 13 );
20  
21 #-----------------------------------------------------------------------------
22  
23 13 Readonly::Array our @EXPORT_OK => qw< throw_global_value >;
24  
25 #-----------------------------------------------------------------------------
26  
27 194 ▶sub full_message {
Subroutine full_message: called CC=4 SCAR=14.1
Pod documented
28 194 my ( $self ) = @_;
29  
30 194 my $source = $self->source();
31 194 ▶ if ($source) {
Branch: 1 branch
BranchTrueFalseTotal
if ($source) { } 182 12 194
32 182 $source = qq{ found in "$source"};
33 }
34 else {
35 12 $source = $EMPTY;
36 }
37  
38 194 my $option_name = $self->option_name();
39 194 ▶ my $option_value =
Branch: 1 branch
BranchTrueFalseTotal
defined $self->option_value ? : 194 0 194
40 defined $self->option_value()
41 ? $DQUOTE . $self->option_value() . $DQUOTE
42 : '<undef>';
43 194 ▶ my $message_suffix = $self->message_suffix() || $EMPTY;
Condition33%1/3
$self->message_suffix || $Perl::ToPerl6::Exception::Configuration::Option::Global::ParameterValue::EMPTY
l!l&&r!l&&!r
19400
MC/DC0%0/2
$self->message_suffix || $Perl::ToPerl6::Exception::Configuration::Option::Global::ParameterValue::EMPTY
$self->message_suffix $Perl::ToPerl6::Exception::Configuration::Option::Global::ParameterValue::EMPTY
Truth table33%1/3
A || B
A= $self->message_suffixB= $Perl::ToPerl6::Exception::Configuration::Option::Global::ParameterValue::EMPTY
ABresult
1X1
011
000
44  
45 return
46 194 qq{The value for the global "$option_name" option }
47 . qq{($option_value)$source $message_suffix};
48 }
49  
50  
51 13 1;
52  
53 __END__
« lib/Perl/ToPerl6/Transformer/CompoundStatements/SwapForArguments.pm ↑ Summary lib/Perl/ToPerl6/Transformer/Pragmas/RewritePragmas.pm »