lib/Flux/In/Role/Easy.pm

filter: Statementstmt 46.6% 7 / 15 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 1 / 3 Podpod 0.0% 0 / 2 totaltotal 30.7% 8 / 26 CC 4 SCAR 26.1
CC
4
Cov
33%
read_chunk
20.0
BEGIN
1.0
commit
1.0
CRAP 13.7
↑ Summary lib/Flux/Mapper.pm »
1 package Flux::In::Role::Easy;
2 {
3 2 $Flux::In::Role::Easy::VERSION = '1.03';
4 }
5  
6 # ABSTRACT: simplified version of Flux::In role
7  
8  
9 2 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 with 'Flux::In';
11  
12 0 ▶sub read_chunk {
Subroutine read_chunk: not called CC=4 SCAR=30.0
Pod undocumented
13 0 my $self = shift;
14 0 my ($limit) = @_;
15  
16 0 my @chunk;
17 0 ▶ while (defined($_ = $self->read)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = $self->read)) 0 0 0
18 0 push @chunk, $_;
19 0 ▶ last if @chunk >= $limit;
Branch: 1 branch
BranchTrueFalseTotal
if @chunk >= $limit 0 0 0
20 }
21 0 ▶ return unless @chunk; # return false if nothing can be read
Branch: 1 branch
BranchTrueFalseTotal
unless @chunk 0 0 0
22 0 return \@chunk;
23 }
24  
25 0 ▶sub commit {
Subroutine commit: not called CC=1 SCAR=0.0
Pod undocumented
26 }
27  
28  
29 2 1;
30  
31 __END__
↑ Summary lib/Flux/Mapper.pm »