| 1 | package Clustericious::Commands; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 45 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 45 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 45 | ▶ | use Clustericious::Config; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 45 | ▶ | use Mojo::Base 'Mojolicious::Commands'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | # ABSTRACT: Clustericious command runner | ||||||||||||||||||||||||||||
| 9 | 45 | our $VERSION = '1.29'; # VERSION | |||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 8 | ▶ | has namespaces => sub { [qw/Clustericious::Command Mojolicious::Command/] }; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 9 | ▶ | has app => sub { Mojo::Server->new->build_app('Clustericious::HelloWorld') }; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 21 | ▶ | sub start { | ||||||||||||||||||||||||||
|
Subroutine
start: called CC=4 SCAR=15.2
Pod
undocumented
| |||||||||||||||||||||||||||||
| 17 | 21 | my $self = shift; | |||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 21 | ▶ | if($ENV{CLUSTERICIOUS_COMMAND_NAME} && @_ == 0) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$ENV{"CLUSTERICIOUS_COMMAND_NAME"} and @_ == 0
MC/DC0%0/2
$ENV{"CLUSTERICIOUS_COMMAND_NAME"} and @_ == 0
$ENV{"CLUSTERICIOUS_COMMAND_NAME"}
@_ == 0
Truth table33%1/3
A and B
A= $ENV{"CLUSTERICIOUS_COMMAND_NAME"}B= @_ == 0
| |||||||||||||||||||||||||||||
| 20 | 0 | @_ = ($ENV{CLUSTERICIOUS_COMMAND_NAME}); | |||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 21 | ▶ | return $self->start_app($ENV{MOJO_APP} => @_) if $ENV{MOJO_APP}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 24 | 9 | return $self->new->app->start(@_); | |||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 45 | 1; | |||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | __END__ | ||||||||||||||||||||||||||||