line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Synapse::Monitor::Listener::Action; |
2
|
1
|
|
|
1
|
|
2105
|
use base qw /Synapse::CLI::Config::Object/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
121
|
|
3
|
1
|
|
|
1
|
|
6
|
use Synapse::Logger; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
62
|
|
4
|
1
|
|
|
1
|
|
6
|
use YAML::XS; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
63
|
|
5
|
1
|
|
|
1
|
|
9
|
use File::Spec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
6
|
1
|
|
|
1
|
|
7
|
use Time::HiRes; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
11
|
|
7
|
1
|
|
|
1
|
|
209
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
45
|
|
8
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
322
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub process { |
12
|
5
|
|
|
5
|
0
|
8
|
my $self = shift; |
13
|
5
|
|
|
|
|
8
|
my $event = shift; |
14
|
5
|
|
|
|
|
228
|
my $tmp = File::Spec->tmpdir() . '/' . Time::HiRes::time() . '.tmp.yml'; |
15
|
5
|
50
|
|
|
|
592
|
open TEMP, ">$tmp" or do { |
16
|
0
|
|
|
|
|
0
|
logger ("cannot write-open $tmp"); |
17
|
0
|
|
|
|
|
0
|
return; |
18
|
|
|
|
|
|
|
}; |
19
|
5
|
|
|
|
|
149
|
print TEMP Dump ($event); |
20
|
5
|
|
|
|
|
191
|
close(TEMP); |
21
|
|
|
|
|
|
|
|
22
|
5
|
|
|
|
|
24
|
my $exec = $self->label(); |
23
|
5
|
|
|
|
|
45
|
logger ("exec YAML_FILE=$tmp $exec"); |
24
|
5
|
|
|
|
|
569
|
system_execute ("YAML_FILE=$tmp $exec"); |
25
|
|
|
|
|
|
|
|
26
|
5
|
|
|
|
|
476
|
unlink $tmp; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub system_execute { |
31
|
|
|
|
|
|
|
my $msg = shift; |
32
|
|
|
|
|
|
|
system ($msg); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |