line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# vim:ft=perl |
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4
|
use parent qw(Ubic::Multiservice); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
6
|
1
|
|
|
1
|
|
48
|
use Ubic::Service::Common; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
160
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
1
|
|
|
1
|
|
7
|
return bless {} => shift; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $eval_id = 1; |
13
|
|
|
|
|
|
|
sub simple_service { |
14
|
0
|
|
|
0
|
|
|
my ($self, $name) = @_; |
15
|
0
|
0
|
0
|
|
|
|
if ($name eq 'abc' or $name eq 'def') { |
16
|
|
|
|
|
|
|
return Ubic::Service::Common->new({ |
17
|
0
|
|
|
0
|
|
|
start => sub { die }, |
18
|
0
|
|
|
0
|
|
|
stop => sub { die }, |
19
|
0
|
|
|
0
|
|
|
status => sub { die }, |
20
|
0
|
|
|
|
|
|
}); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub has_simple_service { |
25
|
0
|
|
|
0
|
|
|
my ($self, $name) = @_; |
26
|
0
|
|
|
|
|
|
return (grep { $name eq $_ } $self->service_names); |
|
0
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub service_names { |
30
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
31
|
0
|
|
|
|
|
|
return qw/ abc def /; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub multiop { |
35
|
0
|
|
|
0
|
|
|
return 'protected'; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__PACKAGE__->new; |