lib/Flux/Mapper/MappedMapper.pm

filter: Statementstmt 76.1% 16 / 21 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 3 totaltotal 66.6% 20 / 30 CC 2 SCAR 4.7
CC
2
Cov
74%
write
2.0
commit
2.0
BEGIN
1.0
CRAP 1.6
« lib/Flux/Mapper/MappedOut.pm ↑ Summary lib/Flux/Storage/Memory.pm »
1 package Flux::Mapper::MappedMapper;
2 {
3 4 $Flux::Mapper::MappedMapper::VERSION = '1.03';
4 }
5  
6 # ABSTRACT: representation of mapper|mapper
7  
8  
9 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 4 with 'Flux::Mapper';
11  
12 4 has ['left', 'right'] => (
13 is => 'ro',
14 required => 1,
15 );
16  
17 1 ▶sub write {
Subroutine write: called CC=2 SCAR=7.0
Pod undocumented
18 1 my ($self, $item) = @_;
19 1 my @items = $self->left->write($item);
20 1 my @result = map { $self->right->write($_) } @items;
21 1 ▶ return (wantarray ? @result : $result[0]);
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 1 1
22 }
23  
24 1 ▶sub write_chunk {
Subroutine write_chunk: called CC=1 SCAR=0.0
Pod undocumented
25 1 my ($self, $chunk) = @_;
26 1 $chunk = $self->left->write_chunk($chunk);
27 1 return $self->right->write_chunk($chunk);
28 }
29  
30 0 ▶sub commit {
Subroutine commit: not called CC=1 SCAR=6.9
Pod undocumented
31 0 my ($self) = @_;
32 0 my @items = $self->left->commit;
33 0 my $result = $self->right->write_chunk(\@items);
34 0 push @$result, $self->right->commit;
35 0 return @$result;
36 }
37  
38 4 1;
39  
40 __END__
« lib/Flux/Mapper/MappedOut.pm ↑ Summary lib/Flux/Storage/Memory.pm »