line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Flux::In::Role::Easy; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Flux::In::Role::Easy::VERSION = '1.03'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: simplified version of Flux::In role |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
26325
|
use Moo::Role; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
16
|
|
10
|
|
|
|
|
|
|
with 'Flux::In'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub read_chunk { |
13
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
14
|
0
|
|
|
|
|
|
my ($limit) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my @chunk; |
17
|
0
|
|
|
|
|
|
while (defined($_ = $self->read)) { |
18
|
0
|
|
|
|
|
|
push @chunk, $_; |
19
|
0
|
0
|
|
|
|
|
last if @chunk >= $limit; |
20
|
|
|
|
|
|
|
} |
21
|
0
|
0
|
|
|
|
|
return unless @chunk; # return false if nothing can be read |
22
|
0
|
|
|
|
|
|
return \@chunk; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
0
|
|
sub commit { |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |