File Coverage

lib/Flux/Mapper/Role/Easy.pm
Criterion Covered Total %
statement 9 10 90.0
branch 1 2 50.0
condition n/a
subroutine 2 3 66.6
pod 0 2 0.0
total 12 17 70.5


line stmt bran cond sub pod time code
1             package Flux::Mapper::Role::Easy;
2             {
3             $Flux::Mapper::Role::Easy::VERSION = '1.03';
4             }
5              
6             # ABSTRACT: simplified version of Flux::Mapper role
7              
8              
9 7     7   12028 use Moo::Role;
  7         11  
  7         41  
10             with 'Flux::Mapper';
11              
12             sub write_chunk {
13 2     2 0 4 my ($self, $chunk) = @_;
14 2 50       7 die "write_chunk method expects arrayref, you specified: '$chunk'" unless ref($chunk) eq 'ARRAY'; # can chunks be blessed into something?
15 2         4 my @result_chunk;
16 2         3 for my $item (@$chunk) {
17 4         14 push @result_chunk, $self->write($item);
18             }
19 2         16 return \@result_chunk;
20             }
21              
22             sub commit {
23 0     0 0   return ();
24             }
25              
26              
27             1;
28              
29             __END__