blib/lib/OPP/Proc/Expand.pm

filter: Statementstmt 54.5% 12 / 22 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 48.3% 15 / 31 CC 4 SCAR 24.7
CC
4
Cov
46%
process
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 11.9
« blib/lib/Class/Gomor/Array.pm ↑ Summary blib/lib/OPP/Proc/Fieldcount.pm »
1 #
2 # $Id: Expand.pm,v cd68184c46bd 2023/03/23 09:32:23 gomor $
3 #
4 package OPP::Proc::Expand;
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use base qw(OPP::Proc);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 __PACKAGE__->cgBuildIndices;
10  
11 1 our $VERSION = '1.00';
12  
13 #
14 # | expand domain
15 #
16 sub process {
17 0 ▶ my $self = shift;
Subroutine process: not called CC=4 SCAR=30.0
Pod undocumented
18 0 my ($input) = @_;
19  
20 0 ▶ my $field = $self->options->{0} or return;
Branch: 1 branch
BranchTrueFalseTotal
my $field = $self->options->{0} or return 0 0 0
21  
22 0 my $values = $self->value($input, $field);
23 # No field by that name, we keep original input untouched:
24 0 ▶ $self->output->add($input) unless defined $values;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $values 0 0 0
25  
26 0 for my $v (@$values) {
27 0 my $clone = $self->clone($input);
28 0 $self->set($clone, $field, $v);
29 0 $self->output->add($clone);
30 }
31  
32 0 return 1;
33 }
34  
35 1 1;
36  
37 __END__
« blib/lib/Class/Gomor/Array.pm ↑ Summary blib/lib/OPP/Proc/Fieldcount.pm »