line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Flux::Simple; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Flux::Simple::VERSION = '1.03'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: functional-style stream generators |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
6
|
|
|
6
|
|
113002
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
238
|
|
10
|
6
|
|
|
6
|
|
27
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
143
|
|
11
|
|
|
|
|
|
|
|
12
|
6
|
|
|
6
|
|
2529
|
use Flux::Simple::ArrayIn; |
|
6
|
|
|
|
|
21
|
|
|
6
|
|
|
|
|
161
|
|
13
|
6
|
|
|
6
|
|
2686
|
use Flux::Simple::ArrayOut; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
219
|
|
14
|
6
|
|
|
6
|
|
3778
|
use Flux::Mapper::Anon; |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
214
|
|
15
|
|
|
|
|
|
|
|
16
|
6
|
|
|
6
|
|
4933
|
use parent qw(Exporter); |
|
6
|
|
|
|
|
1913
|
|
|
6
|
|
|
|
|
32
|
|
17
|
|
|
|
|
|
|
our @EXPORT_OK = qw( array_in array_out mapper ); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub array_in { |
20
|
2
|
|
|
2
|
1
|
26
|
my ($arrayref) = @_; |
21
|
2
|
|
|
|
|
26
|
return Flux::Simple::ArrayIn->new($arrayref); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub array_out { |
25
|
2
|
|
|
2
|
1
|
23
|
my ($arrayref) = @_; |
26
|
2
|
|
|
|
|
27
|
return Flux::Simple::ArrayOut->new($arrayref); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub mapper(&;&) { |
30
|
7
|
|
|
7
|
1
|
93
|
my ($cb, $commit_cb) = @_; |
31
|
|
|
|
|
|
|
|
32
|
7
|
|
|
|
|
20
|
my @args = (cb => $cb); |
33
|
7
|
50
|
|
|
|
28
|
push @args, commit_cb => $commit_cb if defined $commit_cb; |
34
|
7
|
|
|
|
|
116
|
return Flux::Mapper::Anon->new(@args); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |