line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
32
|
|
|
32
|
|
165
|
use strict; |
|
32
|
|
|
|
|
54
|
|
|
32
|
|
|
|
|
1137
|
|
2
|
32
|
|
|
32
|
|
163
|
use warnings; |
|
32
|
|
|
|
|
55
|
|
|
32
|
|
|
|
|
915
|
|
3
|
|
|
|
|
|
|
|
4
|
32
|
|
|
32
|
|
161
|
use Carp qw(croak); |
|
32
|
|
|
|
|
55
|
|
|
32
|
|
|
|
|
1419
|
|
5
|
|
|
|
|
|
|
|
6
|
32
|
|
|
32
|
|
171
|
use VS::RuleEngine::Engine::Common; |
|
32
|
|
|
|
|
49
|
|
|
32
|
|
|
|
|
905
|
|
7
|
32
|
|
|
32
|
|
213
|
use VS::RuleEngine::TypeDecl; |
|
32
|
|
|
|
|
56
|
|
|
32
|
|
|
|
|
8341
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub add_output { |
10
|
7
|
|
|
7
|
1
|
24
|
my ($self, $name, $output, $defaults, @args) = @_; |
11
|
7
|
|
|
|
|
38
|
$self->_check_add_args('Output', \&has_output, $name, $output); |
12
|
7
|
|
|
|
|
177
|
$self->_outputs->set($name => VS::RuleEngine::TypeDecl->new($output, $defaults, @args)); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub outputs { |
16
|
34
|
|
|
34
|
1
|
57
|
my $self = shift; |
17
|
34
|
|
|
|
|
838
|
return $self->_outputs->keys; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub has_output { |
21
|
18
|
|
|
18
|
1
|
609
|
my ($self, $name) = @_; |
22
|
18
|
|
|
|
|
525
|
return $self->_outputs->exists($name); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _get_output { |
26
|
7
|
|
|
7
|
|
21
|
my ($self, $name) = @_; |
27
|
|
|
|
|
|
|
|
28
|
7
|
50
|
|
|
|
23
|
if ($self->has_output($name)) { |
29
|
7
|
|
|
|
|
164
|
return $self->_outputs->get($name); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
croak "Can't find output '$name'"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |