| 1 | package Mojolicious::Plugin::TapperConfig; | ||||||||||||
| 2 | 1 | our $AUTHORITY = 'cpan:TAPPER'; | |||||||||||
| 3 | 1 | $Mojolicious::Plugin::TapperConfig::VERSION = '5.0.2'; | |||||||||||
| 4 | 1 | ▶ | use Mojo::Base 'Mojolicious::Plugin'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 1 | ▶ | use Tapper::Config; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | # ABSTRACT: create config for Hypnotoad used in Tapper | ||||||||||||
| 7 | |||||||||||||
| 8 | |||||||||||||
| 9 | 1 | ▶ | sub register { | ||||||||||
|
Subroutine
register: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 10 | |||||||||||||
| 11 | 1 | my ($self, $app) = @_; | |||||||||||
| 12 | |||||||||||||
| 13 | 1 | ▶ | my $port = Tapper::Config->subconfig->{rest_api_port} || 3000; | ||||||||||
|
Condition50%1/2
'Tapper::Config'->subconfig->{'rest_api_port'} || 3000
MC/DC0%0/1
'Tapper::Config'->subconfig->{'rest_api_port'} || 3000
'Tapper::Config'->subconfig->{'rest_api_port'}
Truth table50%1/2
A
A= 'Tapper::Config'->subconfig->{'rest_api_port'}
| |||||||||||||
| 14 | 1 | my $pid_file = Tapper::Config->subconfig->{paths}{workdir}."/tapper-rest-api-daemon.pid"; | |||||||||||
| 15 | 1 | my $config = {hypnotoad => {listen => ["http://*:$port"], pid_file => $pid_file}}; | |||||||||||
| 16 | 1 | my $current = $app->defaults(config => $app->config)->config; | |||||||||||
| 17 | 1 | %{$current} = (%{$current}, %{$config}); | |||||||||||
| 18 | |||||||||||||
| 19 | 1 | return $current; | |||||||||||
| 20 | |||||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 1 | 1; | |||||||||||
| 24 | |||||||||||||
| 25 | __END__ | ||||||||||||