lib/Flux/Mapper/Role/Easy.pm

filter: Statementstmt 92.8% 13 / 14 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 2 totaltotal 76.1% 16 / 21 CC 3 SCAR 8.8
CC
3
Cov
88%
write_chunk
3.0
commit
2.0
BEGIN
1.0
CRAP 2.4
« lib/Flux/Mapper/MappedIn.pm ↑ Summary lib/Flux/Out/Role/Easy.pm »
1 package Flux::Mapper::Role::Easy;
2 {
3 7 $Flux::Mapper::Role::Easy::VERSION = '1.03';
4 }
5  
6 # ABSTRACT: simplified version of Flux::Mapper role
7  
8  
9 7 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 7 with 'Flux::Mapper';
11  
12 2 ▶sub write_chunk {
Subroutine write_chunk: called CC=3 SCAR=11.0
Pod undocumented
13 2 my ($self, $chunk) = @_;
14 2 ▶ die "write_chunk method expects arrayref, you specified: '$chunk'" unless ref($chunk) eq 'ARRAY'; # can chunks be blessed into something?
Branch: 1 branch
BranchTrueFalseTotal
unless ref $chunk eq "ARRAY" 0 2 2
15 2 my @result_chunk;
16 2 for my $item (@$chunk) {
17 4 push @result_chunk, $self->write($item);
18 }
19 2 return \@result_chunk;
20 }
21  
22 0 ▶sub commit {
Subroutine commit: not called CC=1 SCAR=6.9
Pod undocumented
23 0 return ();
24 }
25  
26  
27 7 1;
28  
29 __END__
« lib/Flux/Mapper/MappedIn.pm ↑ Summary lib/Flux/Out/Role/Easy.pm »