| 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
| |||||||||||||||||||||||||||||
| 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
Condition0%0/3
$command and grep /^$command$/, ("start", "status", "restart", "stop")
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")
| |||||||||||||||||||||||||||||
| 37 | 0 | $self->$command; | |||||||||||||||||||||||||||
| 38 | 0 | say $self->status_message; | |||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 8 | 1; | |||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | __END__ | ||||||||||||||||||||||||||||