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

filter: Statementstmt 100% 29 / 29 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 89.1% 41 / 46 CC 4 SCAR 8.1
CC
4
Cov
92%
full_message
4.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitVoidGrep.pm ↑ Summary lib/Perl/Critic/PolicyParameter.pm »
1 package Perl::Critic::Exception::Configuration::Option::Global::ParameterValue;
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 ▶use Perl::Critic::Utils qw{ :characters };
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 40 our $VERSION = '1.156';
12  
13 #-----------------------------------------------------------------------------
14  
15 40 ▶use Exception::Class (
Subroutine BEGIN: called CC=1 SCAR=0.0
16 40 'Perl::Critic::Exception::Configuration::Option::Global::ParameterValue' => {
17 isa => 'Perl::Critic::Exception::Configuration::Option::Global',
18 description => 'A problem with the value of a global parameter.',
19 alias => 'throw_global_value',
20 },
21 40 );
22  
23 #-----------------------------------------------------------------------------
24  
25 40 Readonly::Array our @EXPORT_OK => qw< throw_global_value >;
26  
27 #-----------------------------------------------------------------------------
28  
29 207 ▶sub full_message {
Subroutine full_message: called CC=4 SCAR=14.1
Pod documented
30 207 my ( $self ) = @_;
31  
32 207 my $source = $self->source();
33 207 ▶ if ($source) {
Branch: 1 branch
BranchTrueFalseTotal
if ($source) { } 195 12 207
34 195 $source = qq{ found in "$source"};
35 }
36 else {
37 12 $source = $EMPTY;
38 }
39  
40 207 my $option_name = $self->option_name();
41 207 ▶ my $option_value =
Branch: 1 branch
BranchTrueFalseTotal
defined $self->option_value ? : 207 0 207
42 defined $self->option_value()
43 ? $DQUOTE . $self->option_value() . $DQUOTE
44 : '<undef>';
45 207 ▶ my $message_suffix = $self->message_suffix() || $EMPTY;
Condition33%1/3
$self->message_suffix || $Perl::Critic::Exception::Configuration::Option::Global::ParameterValue::EMPTY
l!l&&r!l&&!r
20700
MC/DC0%0/2
$self->message_suffix || $Perl::Critic::Exception::Configuration::Option::Global::ParameterValue::EMPTY
$self->message_suffix $Perl::Critic::Exception::Configuration::Option::Global::ParameterValue::EMPTY
Truth table33%1/3
A || B
A= $self->message_suffixB= $Perl::Critic::Exception::Configuration::Option::Global::ParameterValue::EMPTY
ABresult
1X1
011
000
46  
47 return
48 207 qq{The value for the global "$option_name" option }
49 . qq{($option_value)$source $message_suffix};
50 }
51  
52  
53 40 1;
54  
55 __END__
« lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitVoidGrep.pm ↑ Summary lib/Perl/Critic/PolicyParameter.pm »