line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dallycot::AST::LoopBase; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:JSMITH'; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# ABSTRACT: Base class for operations that loop over a series of expressions |
5
|
|
|
|
|
|
|
|
6
|
23
|
|
|
23
|
|
8065
|
use strict; |
|
23
|
|
|
|
|
37
|
|
|
23
|
|
|
|
|
703
|
|
7
|
23
|
|
|
23
|
|
91
|
use warnings; |
|
23
|
|
|
|
|
34
|
|
|
23
|
|
|
|
|
511
|
|
8
|
|
|
|
|
|
|
|
9
|
23
|
|
|
23
|
|
83
|
use utf8; |
|
23
|
|
|
|
|
29
|
|
|
23
|
|
|
|
|
95
|
|
10
|
23
|
|
|
23
|
|
447
|
use parent 'Dallycot::AST'; |
|
23
|
|
|
|
|
30
|
|
|
23
|
|
|
|
|
108
|
|
11
|
|
|
|
|
|
|
|
12
|
23
|
|
|
23
|
|
1325
|
use Promises qw(deferred); |
|
23
|
|
|
|
|
34
|
|
|
23
|
|
|
|
|
116
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub execute { |
15
|
0
|
|
|
0
|
0
|
|
my ( $self, $engine ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my $d = deferred; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
$self->process_loop( $engine, $d, @$self ); |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return $d->promise; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub process_loop { |
25
|
0
|
|
|
0
|
0
|
|
my ( $self, $engine, $d ) = @_; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
$d->reject( "Loop body is undefined for " . ref($self) . "." ); |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
return; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |