lib/Perl/ToPerl6/TransformerParameter/Behavior/String.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 100% 34 / 34 CC 2 SCAR 2.2
CC
2
Cov
100%
_parse
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/Perl/ToPerl6/Exception/Configuration/Option/Transformer.pm ↑ Summary lib/Perl/ToPerl6/Transformer/PostfixExpressions/AddWhitespace.pm »
1 package Perl::ToPerl6::TransformerParameter::Behavior::String;
2  
3 23 ▶use 5.006001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 23 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 23 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 23 ▶use Perl::ToPerl6::Utils;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 23 ▶use base qw{ Perl::ToPerl6::TransformerParameter::Behavior };
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 #-----------------------------------------------------------------------------
12  
13 4 ▶sub _parse {
Subroutine _parse: called CC=2 SCAR=6.9
14 4 my ($transformer, $parameter, $config_string) = @_;
15  
16 4 my $value = $parameter->get_default_string();
17  
18 4 ▶ if ( defined $config_string ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $config_string) 2 2 4
19 2 $value = $config_string;
20 }
21  
22 4 $transformer->__set_parameter_value($parameter, $value);
23  
24 4 return;
25 }
26  
27 #-----------------------------------------------------------------------------
28  
29 2 ▶sub initialize_parameter {
Subroutine initialize_parameter: called CC=1 SCAR=0.0
Pod documented
30 2 my ($self, $parameter, $specification) = @_;
31  
32 2 $parameter->_set_parser(\&_parse);
33  
34 2 return;
35 }
36  
37 #-----------------------------------------------------------------------------
38  
39 23 1;
40  
41 __END__
« lib/Perl/ToPerl6/Exception/Configuration/Option/Transformer.pm ↑ Summary lib/Perl/ToPerl6/Transformer/PostfixExpressions/AddWhitespace.pm »