| 1 | package Tapper::Reports::Receiver::Daemon; | ||||||||||||||||||||||||||||
| 2 | 7 | our $AUTHORITY = 'cpan:TAPPER'; | |||||||||||||||||||||||||||
| 3 | 7 | $Tapper::Reports::Receiver::Daemon::VERSION = '5.0.1'; | |||||||||||||||||||||||||||
| 4 | 7 | ▶ | use 5.010; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 7 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 7 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 7 | ▶ | use Tapper::Config; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 7 | ▶ | use Tapper::Reports::Receiver; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 7 | ▶ | use Log::Log4perl; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | 7 | ▶ | use Moose; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 7 | with 'MooseX::Daemonize'; | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | after start => sub { | ||||||||||||||||||||||||||||
| 17 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 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 | 7 | }; | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | sub run | ||||||||||||||||||||||||||||
| 33 | { | ||||||||||||||||||||||||||||
| 34 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
run: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 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 | 7 | 1; | |||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | __END__ | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | =pod | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | =encoding UTF-8 | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | =head1 NAME | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | Tapper::Reports::Receiver::Daemon | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | =head2 run | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | Run daemon. | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | AMD OSRC Tapper Team <tapper@amd64.org> | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | This software is Copyright (c) 2016 by Advanced Micro Devices, Inc.. | ||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | This is free software, licensed under: | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | The (two-clause) FreeBSD License | ||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | =cut | ||||||||||||||||||||||||||||