Receiver/Daemon.pm

filter: Statementstmt 69.4% 25 / 36 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 77.7% 7 / 9 Podpod 100% 1 / 1 totaltotal 60.0% 33 / 55 CC 4 SCAR 15.2
CC
4
Cov
58%
run
12.0
__ANON__
6.0
BEGIN
1.0
CRAP 4.6
« Receiver/Level2/Codespeed.pm ↑ Summary Receiver/Util.pm »
1 package Tapper::Reports::Receiver::Daemon;
2 8 our $AUTHORITY = 'cpan:TAPPER';
3 8 $Tapper::Reports::Receiver::Daemon::VERSION = '5.0.2';
4 8 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 8 ▶use Tapper::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 8 ▶use Tapper::Reports::Receiver;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 8 ▶use Log::Log4perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 8 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 8 with 'MooseX::Daemonize';
15  
16 0 ▶after start => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
17 0 my $self = shift;
18  
19 0 ▶ return unless $self->is_daemon;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->is_daemon 0 0 0
20  
21  
22  
23 0 my $logconf = Tapper::Config->subconfig->{files}{log4perl_cfg};
24 0 Log::Log4perl->init($logconf);
25  
26 0 my $port = Tapper::Config->subconfig->{report_port};
27 0 Tapper::Reports::Receiver->new()->run($port);
28 8 };
29  
30  
31  
32 sub run
33 0 ▶{
Subroutine run: not called CC=3 SCAR=24.8
Pod documented
34 0 my ($self) = @_;
35 0 my ($command) = @ARGV;
36 0 ▶ return unless $command && grep /^$command$/, qw(start status restart stop);
Branch: 1 branch
BranchTrueFalseTotal
unless $command and grep /^$command$/, ("start", "status", "restart", "stop") 0 0 0
Condition0%0/3
$command and grep /^$command$/, ("start", "status", "restart", "stop")
!ll&&!rl&&r
000
MC/DC0%0/2
$command and grep /^$command$/, ("start", "status", "restart", "stop")
$command grep /^$command$/, ("start", "status", "restart", "stop")
Truth table0%0/3
A and B
A= $commandB= grep /^$command$/, ("start", "status", "restart", "stop")
ABresult
0X0
100
111
37 0 $self->$command;
38 0 say $self->status_message;
39 }
40  
41  
42 8 1;
43  
44 __END__
« Receiver/Level2/Codespeed.pm ↑ Summary Receiver/Util.pm »