line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
2
|
|
|
2
|
|
654
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
24
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2018'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Role::Tiny::With; |
7
|
2
|
|
|
2
|
|
12
|
use namespace::clean; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
94
|
|
8
|
2
|
|
|
2
|
|
12
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
9
|
|
|
|
|
|
|
with 'Catmandu::Iterable'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my ($class, @iterators) = @_; |
12
|
|
|
|
|
|
|
my $self = \@iterators; |
13
|
1
|
|
|
1
|
0
|
30
|
bless $self, $class; |
14
|
1
|
|
|
|
|
3
|
} |
15
|
1
|
|
|
|
|
3
|
|
16
|
|
|
|
|
|
|
my ($self) = @_; |
17
|
|
|
|
|
|
|
sub { |
18
|
|
|
|
|
|
|
state $generators = [map {$_->generator} @$self]; |
19
|
1
|
|
|
1
|
0
|
2
|
while (@$generators) { |
20
|
|
|
|
|
|
|
my $data = $generators->[0]->(); |
21
|
7
|
|
|
7
|
|
11
|
return $data if defined $data; |
|
2
|
|
|
|
|
7
|
|
22
|
7
|
|
|
|
|
11
|
shift @$generators; |
23
|
8
|
|
|
|
|
12
|
} |
24
|
8
|
100
|
|
|
|
20
|
return; |
25
|
2
|
|
|
|
|
5
|
}; |
26
|
|
|
|
|
|
|
} |
27
|
1
|
|
|
|
|
3
|
|
28
|
1
|
|
|
|
|
5
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Catmandu::MultiIterator - chain multiple iterators together |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 SYNOPSIS |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
my $it = Catmandu::MultiIterator->new( |
40
|
|
|
|
|
|
|
Catmandu::Importer::Mock->new, |
41
|
|
|
|
|
|
|
Catmandu::Importer::Mock->new, |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# return all the items of each importer in turn |
45
|
|
|
|
|
|
|
$it->each(sub { |
46
|
|
|
|
|
|
|
# ... |
47
|
|
|
|
|
|
|
}); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 METHODS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
All L<Catmandu::Iterable> methods are available. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |