blib/lib/Clustericious/Command/lighttpd.pm

filter: Statementstmt 75.7% 25 / 33 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 100% 1 / 1 totaltotal 66.0% 33 / 50 CC 5 SCAR 25.7
CC
5
Cov
61%
run
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 13.1
« blib/lib/Clustericious/Command/generate/client.pm ↑ Summary blib/lib/Clustericious/Log.pm »
1 package Clustericious::Command::lighttpd;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Clustericious::Log;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Clustericious::App;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Clustericious::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use base 'Clustericious::Command';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use File::Which qw( which );
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 # ABSTRACT: Clustericious command to stat lighttpd
12 1 our $VERSION = '1.29'; # VERSION
13  
14  
15 1 __PACKAGE__->attr(description => <<EOT);
16 Start a lighttpd web server.
17 EOT
18  
19 1 __PACKAGE__->attr(usage => <<EOT);
20 Usage $0: lighttpd -f <config file> [...other lighttpd options]
21 Starts a lighttpd webserver.
22 Options are passed verbatim to the lighttpd executable.
23 EOT
24  
25 0 ▶sub run {
Subroutine run: not called CC=5 SCAR=34.0
Pod documented
26 0 my($self, @args) = @_;
27 0 my $app_name = $ENV{MOJO_APP};
28  
29 0 ▶ my $lighttpd = which('lighttpd') or LOGDIE "could not find lighttpd in $ENV{PATH}";
Branch: 1 branch
BranchTrueFalseTotal
my $lighttpd = which("lighttpd") or LOGDIE(qq[could not find lighttpd in $ENV{"PATH"}]) 0 0 0
30 0 DEBUG "starting $lighttpd @args";
31 0 system $lighttpd, @args;
32 0 ▶ die "'$lighttpd @args' Failed to execute: $!" if $? == -1;
Branch: 1 branch
BranchTrueFalseTotal
if $? == -1 0 0 0
33 0 ▶ die "'$lighttpd @args' Killed with signal: ", $? & 127 if $? & 127;
Branch: 1 branch
BranchTrueFalseTotal
if $? & 127 0 0 0
34 0 ▶ die "'$lighttpd @args' Exited with ", $? >> 8 if $? >> 8;
Branch: 1 branch
BranchTrueFalseTotal
if $? >> 8 0 0 0
35 }
36  
37 1 1;
38  
39 __END__
« blib/lib/Clustericious/Command/generate/client.pm ↑ Summary blib/lib/Clustericious/Log.pm »