tfiles/service/multi-impl

filter: Statementstmt 84.0% 63 / 75 Branchbran 50.0% 3 / 6 Conditioncond 66.6% 6 / 9 MC/DCmcdc 0.0% 0 / 6 Subroutinesub 80.0% 24 / 30 Podpod n/a totaltotal 76.1% 96 / 126 SCAR 20.0
CC
7
Cov
80%
simple_service
3.6
simple_service
3.6
simple_service
3.6
CRAP 7.4
« lib/Ubic/ServiceLoader/Ext/ini.pm ↑ Summary lib/Ubic/Service/Utils.pm »
1 # vim:ft=perl
2 89 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
3 89 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 89 ▶use parent qw(Ubic::Multiservice);
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
6 89 ▶use Ubic::Service::Common;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub new {
9 89 ▶ return bless {} => shift;
Subroutine new: called CC=1 SCAR=0.0
Subroutine new: called CC=1 SCAR=0.0
Subroutine new: called CC=1 SCAR=0.0
10 }
11  
12 my $eval_id = 1;
13 sub simple_service {
14 108 ▶ my ($self, $name) = @_;
Subroutine simple_service: called CC=3 SCAR=12.7
Subroutine simple_service: called CC=3 SCAR=12.7
Subroutine simple_service: called CC=3 SCAR=12.7
15 108 ▶ if ($name eq 'abc' or $name eq 'def') {
Branch: 3 branches
BranchTrueFalseTotal
if ($name eq "abc" or $name eq "def") 108 0 108
if ($name eq "abc" or $name eq "def") 19 0 19
if ($name eq "abc" or $name eq "def") 3 0 3
Condition66%6/9
$name eq "abc" or $name eq "def"
l!l&&r!l&&!r
55530
$name eq "abc" or $name eq "def"
l!l&&r!l&&!r
8110
$name eq "abc" or $name eq "def"
l!l&&r!l&&!r
210
MC/DC0%0/2
$name eq "abc" or $name eq "def"
$name eq "abc" $name eq "def"
MC/DC0%0/2
$name eq "abc" or $name eq "def"
$name eq "abc" $name eq "def"
MC/DC0%0/2
$name eq "abc" or $name eq "def"
$name eq "abc" $name eq "def"
Truth table66%2/3
A or B
A= $name eq "abc"B= $name eq "def"
ABresult
1X1
011
000
Truth table66%2/3
A or B
A= $name eq "abc"B= $name eq "def"
ABresult
1X1
011
000
Truth table66%2/3
A or B
A= $name eq "abc"B= $name eq "def"
ABresult
1X1
011
000
16 return Ubic::Service::Common->new({
17 0 ▶ start => sub { die },
Subroutine __ANON__: not called CC=1 SCAR=6.9
18 0 ▶ stop => sub { die },
Subroutine __ANON__: not called CC=1 SCAR=6.9
19 0 ▶ status => sub { die },
Subroutine __ANON__: not called CC=1 SCAR=0.4
20 108 });
21 }
22 }
23  
24 sub has_simple_service {
25 4 ▶ my ($self, $name) = @_;
Subroutine has_simple_service: called CC=1 SCAR=0.4
Subroutine has_simple_service: called CC=1 SCAR=0.4
Subroutine has_simple_service: not called CC=1 SCAR=0.4
26 4 return (grep { $name eq $_ } $self->service_names);
27 }
28  
29 sub service_names {
30 56 ▶ my ($self) = @_;
Subroutine service_names: called CC=1 SCAR=0.0
Subroutine service_names: called CC=1 SCAR=0.0
Subroutine service_names: called CC=1 SCAR=0.0
31 56 return qw/ abc def /;
32 }
33  
34 sub multiop {
35 1 ▶ return 'protected';
Subroutine multiop: called CC=1 SCAR=2.6
Subroutine multiop: not called CC=1 SCAR=2.6
Subroutine multiop: not called CC=1 SCAR=2.6
36 }
37  
38 __PACKAGE__->new;
« lib/Ubic/ServiceLoader/Ext/ini.pm ↑ Summary lib/Ubic/Service/Utils.pm »