| 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
| |||||||||||
| 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__ | ||||||||||