MCP/Daemon.pm

filter: Statementstmt 75.7% 25 / 33 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 77.7% 7 / 9 Podpod 100% 1 / 1 totaltotal 61.1% 33 / 54 CC 5 SCAR 20.3
CC
5
Cov
60%
run
20.0
__ANON__
6.0
BEGIN
1.0
CRAP 7.6
« MCP/State.pm ↑ Summary MCP/Net.pm »
1 package Tapper::MCP::Daemon;
2 1 our $AUTHORITY = 'cpan:TAPPER';
3 1 $Tapper::MCP::Daemon::VERSION = '5.0.9';
4 1 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Tapper::MCP::Master;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Tapper::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Log::Log4perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 with 'MooseX::Daemonize';
15  
16  
17 0 ▶after start => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
18 0 my $self = shift;
19  
20 0 ▶ return unless $self->is_daemon;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->is_daemon 0 0 0
21  
22 0 my $daemon = Tapper::MCP::Master->new()->run;
23 1 };
24  
25  
26 sub run
27 0 ▶{
Subroutine run: not called CC=4 SCAR=30.0
Pod documented
28 0 my $self = shift;
29  
30 0 ▶ my ($command) = @ARGV ? @ARGV : @_;
Branch: 1 branch
BranchTrueFalseTotal
@ARGV ? : 0 0 0
31 0 ▶ return unless $command && grep /^$command$/, qw(start status stop);
Branch: 1 branch
BranchTrueFalseTotal
unless $command and grep /^$command$/, ("start", "status", "stop") 0 0 0
Condition0%0/3
$command and grep /^$command$/, ("start", "status", "stop")
!ll&&!rl&&r
000
MC/DC0%0/2
$command and grep /^$command$/, ("start", "status", "stop")
$command grep /^$command$/, ("start", "status", "stop")
Truth table0%0/3
A and B
A= $commandB= grep /^$command$/, ("start", "status", "stop")
ABresult
0X0
100
111
32 0 $self->$command;
33 0 say $self->status_message;
34 }
35 ;
36  
37  
38 1 1;
39  
40 __END__
« MCP/State.pm ↑ Summary MCP/Net.pm »