tfiles/service/fake-http-service

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 16 / 16 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Ubic/Daemon/Status.pm ↑ Summary tfiles/service/fake-http-service2 »
1 # vim: ft=perl
2  
3 89 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 89 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 89 ▶use Ubic::Service::Common;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 89 ▶use Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 });
« lib/Ubic/Daemon/Status.pm ↑ Summary tfiles/service/fake-http-service2 »