Balancer/Command/Status.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 25 CC 2 SCAR 12.8
CC
2
Cov
0%
run
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 package HTTP::Balancer::Command::Status;
2 use Modern::Perl;
3 use Moose;
4  
5 with qw(HTTP::Balancer::Role::Command);
6  
7 use Path::Tiny;
8  
9 sub run {
10 my ($self, ) = @_;
11  
12 my $pidfile = path($self->config->pidfile);
13  
14 if ($pidfile->exists) {
15 my ($pid, ) = $pidfile->lines({chomp => 1});
16 say "$0 is running. pid: $pid";
17 } else {
18 say "$0 is stop";
19 }
20 }
21  
22 1;
23 __END__