line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package UR::Util::ArrayRefIterator; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
752
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
5
|
1
|
|
|
1
|
|
4
|
use UR; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
12
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
class UR::Util::ArrayRefIterator { |
8
|
|
|
|
|
|
|
has => [ |
9
|
|
|
|
|
|
|
arrayref => { |
10
|
|
|
|
|
|
|
is => 'UR::Value::ARRAY', |
11
|
|
|
|
|
|
|
}, |
12
|
|
|
|
|
|
|
position => { |
13
|
|
|
|
|
|
|
is => 'Integer', |
14
|
|
|
|
|
|
|
is_optional => 1, |
15
|
|
|
|
|
|
|
default => 0, |
16
|
|
|
|
|
|
|
}, |
17
|
|
|
|
|
|
|
], |
18
|
|
|
|
|
|
|
id_by => 'arrayref', |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub next { |
22
|
17
|
|
|
17
|
0
|
5025
|
my $self = shift; |
23
|
|
|
|
|
|
|
|
24
|
17
|
|
|
|
|
16
|
my @ar = @{$self->arrayref}; |
|
17
|
|
|
|
|
43
|
|
25
|
17
|
|
|
|
|
39
|
my $val = $ar[$self->position]; |
26
|
17
|
|
|
|
|
25
|
$self->position($self->position + 1); |
27
|
|
|
|
|
|
|
|
28
|
17
|
|
|
|
|
99
|
return $val; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |