| 1 | package Mojolicious::Plugin::ServerType; | ||||||||||||
| 2 | |||||||||||||
| 3 | 2 | ▶ | use Mojo::Base 'Mojolicious::Plugin'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | |||||||||||||
| 5 | 2 | our $VERSION = "0.02"; | |||||||||||
| 6 | |||||||||||||
| 7 | 1 | ▶ | sub register { | ||||||||||
|
Subroutine
register: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 8 | 1 | my ($self, $app, $conf) = (@_); | |||||||||||
| 9 | 1 | ▶ | $conf ||= {}; | ||||||||||
|
Condition50%1/2
$conf ||= {}
MC/DC0%0/1
$conf ||= {}
$conf
Truth table50%1/2
A
A= $conf
| |||||||||||||
| 10 | |||||||||||||
| 11 | $app->helper( | ||||||||||||
| 12 | 1 | ▶ | server_type => sub { | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | 1 | return undef; | |||||||||||
| 14 | } | ||||||||||||
| 15 | 1 | ); | |||||||||||
| 16 | |||||||||||||
| 17 | 3 | ▶ | $app->hook( before_server_start => sub { | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 18 | 3 | my ( $server, $app ) = @_; | |||||||||||
| 19 | |||||||||||||
| 20 | 3 | my $serverType = ref $server; | |||||||||||
| 21 | |||||||||||||
| 22 | $app->helper( | ||||||||||||
| 23 | 2 | ▶ | server_type => sub { | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 24 | 2 | return $serverType; | |||||||||||
| 25 | } | ||||||||||||
| 26 | 3 | ); | |||||||||||
| 27 | 1 | }); | |||||||||||
| 28 | } | ||||||||||||
| 29 | |||||||||||||
| 30 | |||||||||||||
| 31 | 2 | 1; | |||||||||||
| 32 | __END__ | ||||||||||||