Focus/Applicative/Const/List.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 3 / 3 totaltotal 100% 36 / 36 CC 3 SCAR 5.1
CC
3
Cov
100%
build
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
« Focus/Applicative/Const/First.pm ↑ Summary Focus/Lens/Accessor.pm »
1 package Data::Focus::Applicative::Const::List;
2 20 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 20 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 20 ▶use parent qw(Data::Focus::Applicative::Const);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 20 my $PURE = __PACKAGE__->new([]);
7  
8 29 ▶sub pure { $PURE }
Subroutine pure: called CC=1 SCAR=0.0
Pod documented
9  
10 1063 ▶sub build {
Subroutine build: called CC=3 SCAR=11.0
Pod documented
11 1063 my ($class, $builder, @f_parts) = @_;
12 1063 ▶ if(@f_parts == 0) {
Branch: 2 branches
BranchTrueFalseTotal
if (@f_parts == 0) { } 69 994 1063
elsif (@f_parts == 1) { } 551 443 994
13 69 return $PURE;
14 }elsif(@f_parts == 1) {
15 551 return $f_parts[0];
16 }else {
17 443 return $class->new([map { @{$_->get_const} } @f_parts]);
18 }
19 }
20  
21 1012 ▶sub create_part_mapper {
Subroutine create_part_mapper: called CC=1 SCAR=0.0
Pod documented
22 1012 my ($class) = @_;
23 1012 ▶ return sub { $class->new([shift]) };
Subroutine __ANON__: called CC=1 SCAR=0.0
24 }
25  
26  
27 20 1;
28  
29 __END__
« Focus/Applicative/Const/First.pm ↑ Summary Focus/Lens/Accessor.pm »