line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VS::RuleEngine::Engine; |
2
|
|
|
|
|
|
|
|
3
|
32
|
|
|
32
|
|
284391
|
use strict; |
|
32
|
|
|
|
|
104
|
|
|
32
|
|
|
|
|
1144
|
|
4
|
32
|
|
|
32
|
|
183
|
use warnings; |
|
32
|
|
|
|
|
60
|
|
|
32
|
|
|
|
|
1054
|
|
5
|
|
|
|
|
|
|
|
6
|
32
|
|
|
32
|
|
178
|
use Carp qw(croak); |
|
32
|
|
|
|
|
56
|
|
|
32
|
|
|
|
|
2153
|
|
7
|
32
|
|
|
32
|
|
193
|
use Scalar::Util qw(blessed); |
|
32
|
|
|
|
|
79
|
|
|
32
|
|
|
|
|
2642
|
|
8
|
|
|
|
|
|
|
|
9
|
32
|
|
|
32
|
|
13365
|
use VS::RuleEngine::Constants; |
|
32
|
|
|
|
|
67
|
|
|
32
|
|
|
|
|
3946
|
|
10
|
32
|
|
|
32
|
|
21693
|
use VS::RuleEngine::Data; |
|
32
|
|
|
|
|
88
|
|
|
32
|
|
|
|
|
1045
|
|
11
|
32
|
|
|
32
|
|
19713
|
use VS::RuleEngine::Util qw(is_valid_package_name); |
|
32
|
|
|
|
|
346
|
|
|
32
|
|
|
|
|
2016
|
|
12
|
32
|
|
|
32
|
|
18064
|
use VS::RuleEngine::Runloop; |
|
32
|
|
|
|
|
83
|
|
|
32
|
|
|
|
|
1019
|
|
13
|
|
|
|
|
|
|
|
14
|
32
|
|
|
32
|
|
19599
|
use VS::RuleEngine::Engine::Actions; |
|
32
|
|
|
|
|
87
|
|
|
32
|
|
|
|
|
866
|
|
15
|
32
|
|
|
32
|
|
19313
|
use VS::RuleEngine::Engine::Defaults; |
|
32
|
|
|
|
|
89
|
|
|
32
|
|
|
|
|
827
|
|
16
|
32
|
|
|
32
|
|
19534
|
use VS::RuleEngine::Engine::Hooks; |
|
32
|
|
|
|
|
92
|
|
|
32
|
|
|
|
|
738
|
|
17
|
32
|
|
|
32
|
|
18208
|
use VS::RuleEngine::Engine::Inputs; |
|
32
|
|
|
|
|
79
|
|
|
32
|
|
|
|
|
878
|
|
18
|
32
|
|
|
32
|
|
19376
|
use VS::RuleEngine::Engine::Outputs; |
|
32
|
|
|
|
|
82
|
|
|
32
|
|
|
|
|
934
|
|
19
|
32
|
|
|
32
|
|
17508
|
use VS::RuleEngine::Engine::Rules; |
|
32
|
|
|
|
|
85
|
|
|
32
|
|
|
|
|
1190
|
|
20
|
|
|
|
|
|
|
|
21
|
32
|
|
|
|
|
205
|
use Object::Tiny qw( |
22
|
|
|
|
|
|
|
_actions |
23
|
|
|
|
|
|
|
_defaults |
24
|
|
|
|
|
|
|
_hooks |
25
|
|
|
|
|
|
|
_inputs |
26
|
|
|
|
|
|
|
_outputs |
27
|
|
|
|
|
|
|
_post_hooks |
28
|
|
|
|
|
|
|
_pre_hooks |
29
|
|
|
|
|
|
|
_rules |
30
|
|
|
|
|
|
|
_rule_actions |
31
|
|
|
|
|
|
|
_rule_order |
32
|
32
|
|
|
32
|
|
32685
|
); |
|
32
|
|
|
|
|
13048
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub new { |
35
|
56
|
|
|
56
|
1
|
3872
|
my $pkg = shift; |
36
|
|
|
|
|
|
|
|
37
|
56
|
|
|
|
|
2873
|
my $self = bless { |
38
|
|
|
|
|
|
|
_actions => VS::RuleEngine::Data->new(), |
39
|
|
|
|
|
|
|
_defaults => VS::RuleEngine::Data->new(), |
40
|
|
|
|
|
|
|
_hooks => VS::RuleEngine::Data->new(), |
41
|
|
|
|
|
|
|
_inputs => VS::RuleEngine::Data->new(), |
42
|
|
|
|
|
|
|
_outputs => VS::RuleEngine::Data->new(), |
43
|
|
|
|
|
|
|
_post_hooks => [], |
44
|
|
|
|
|
|
|
_pre_hooks => [], |
45
|
|
|
|
|
|
|
_rules => VS::RuleEngine::Data->new(), |
46
|
|
|
|
|
|
|
_rule_actions => VS::RuleEngine::Data->new(), |
47
|
|
|
|
|
|
|
_rule_order => [], |
48
|
|
|
|
|
|
|
}, $pkg; |
49
|
|
|
|
|
|
|
|
50
|
56
|
|
|
|
|
187
|
return $self; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub run { |
54
|
21
|
|
|
21
|
1
|
96
|
my $self = shift; |
55
|
21
|
|
|
|
|
30
|
my $global = shift; |
56
|
|
|
|
|
|
|
|
57
|
21
|
|
|
|
|
117
|
my $runloop = VS::RuleEngine::Runloop->new(); |
58
|
|
|
|
|
|
|
|
59
|
21
|
|
|
|
|
88
|
$runloop->add_engine($self, $global); |
60
|
21
|
|
|
|
|
126
|
$runloop->run(); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
64
|
|
|
|
|
|
|
__END__ |