line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# vim: ft=perl |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
24
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
66
|
|
4
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
88
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
367
|
use Ubic::Service::Common; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
57
|
|
7
|
2
|
|
|
2
|
|
32
|
use Storable; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
343
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $file = 'tfiles/fake-http-service.status'; |
10
|
|
|
|
|
|
|
return Ubic::Service::Common->new({ |
11
|
|
|
|
|
|
|
start => sub { |
12
|
|
|
|
|
|
|
store { status => 'running' } => $file; |
13
|
|
|
|
|
|
|
}, |
14
|
|
|
|
|
|
|
stop => sub { |
15
|
|
|
|
|
|
|
store { status => 'not running' } => $file; |
16
|
|
|
|
|
|
|
}, |
17
|
|
|
|
|
|
|
status => sub { |
18
|
|
|
|
|
|
|
return unless -e $file; |
19
|
|
|
|
|
|
|
return retrieve($file)->{status}; |
20
|
|
|
|
|
|
|
}, |
21
|
|
|
|
|
|
|
port => 12347, |
22
|
|
|
|
|
|
|
}); |