line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Event::ExecFlow::Callbacks; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
9
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
614
|
|
4
|
|
|
|
|
|
|
|
5
|
55
|
|
|
55
|
0
|
2283
|
sub get_cb_list { shift->{cb_list} } |
6
|
0
|
|
|
0
|
0
|
0
|
sub set_cb_list { shift->{cb_list} = $_[1] } |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
59
|
|
|
59
|
0
|
87
|
my $class = shift; |
10
|
59
|
|
|
|
|
81
|
my @cb_list = @_; |
11
|
|
|
|
|
|
|
|
12
|
59
|
|
|
|
|
187
|
my $self = bless { |
13
|
|
|
|
|
|
|
cb_list => \@cb_list, |
14
|
|
|
|
|
|
|
}, $class; |
15
|
|
|
|
|
|
|
|
16
|
59
|
|
|
|
|
217
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub prepend { |
20
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
21
|
0
|
|
|
|
|
0
|
my (@cb) = @_; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
0
|
unshift @{$self->get_cb_list}, @cb; |
|
0
|
|
|
|
|
0
|
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
0
|
return $self; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub add { |
29
|
14
|
|
|
14
|
0
|
62
|
my $self = shift; |
30
|
14
|
|
|
|
|
34
|
my (@cb) = @_; |
31
|
|
|
|
|
|
|
|
32
|
14
|
|
|
|
|
18
|
push @{$self->get_cb_list}, @cb; |
|
14
|
|
|
|
|
29
|
|
33
|
|
|
|
|
|
|
|
34
|
14
|
|
|
|
|
100
|
return $self; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub execute { |
38
|
41
|
|
|
41
|
0
|
78
|
my $self = shift; |
39
|
41
|
|
|
|
|
53
|
my ($job) = @_; |
40
|
|
|
|
|
|
|
|
41
|
41
|
|
|
|
|
54
|
foreach my $cb ( @{$self->get_cb_list} ) { |
|
41
|
|
|
|
|
5580
|
|
42
|
24
|
|
|
|
|
55
|
eval { $cb->(@_) }; |
|
24
|
|
|
|
|
149
|
|
43
|
24
|
50
|
|
|
|
10017
|
print "Catched Callbacks Exception: $@" if $@; |
44
|
24
|
50
|
|
|
|
187
|
if ( $@ ) { |
45
|
0
|
|
|
|
|
0
|
$job->set_error_message($@); |
46
|
0
|
|
|
|
|
0
|
return 0; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
41
|
|
|
|
|
167
|
1; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |