line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
2
|
|
|
2
|
|
708
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
28
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2019'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Role::Tiny::With; |
7
|
2
|
|
|
2
|
|
13
|
use namespace::clean; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
86
|
|
8
|
2
|
|
|
2
|
|
12
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
9
|
|
|
|
|
|
|
with 'Catmandu::Iterable'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my ($class, @iterators) = @_; |
12
|
|
|
|
|
|
|
my $self = \@iterators; |
13
|
1
|
|
|
1
|
0
|
24
|
bless $self, $class; |
14
|
1
|
|
|
|
|
2
|
} |
15
|
1
|
|
|
|
|
4
|
|
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
|
|
|
|
|
5
|
|
22
|
7
|
|
|
|
|
11
|
shift @$generators; |
23
|
8
|
|
|
|
|
13
|
} |
24
|
8
|
100
|
|
|
|
19
|
return; |
25
|
2
|
|
|
|
|
7
|
}; |
26
|
|
|
|
|
|
|
} |
27
|
1
|
|
|
|
|
2
|
|
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 |