blib/lib/Kwiki/Simple/Server/HTTP.pm

filter: Statementstmt 73.0% 19 / 26 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 2 totaltotal 60.0% 24 / 40 CC 2 SCAR 8.6
CC
2
Cov
66%
handle_start
6.0
register
2.0
BEGIN
1.0
CRAP 2.4
↑ Summary
1 package Kwiki::Simple::Server::HTTP;
2 1 ▶use Kwiki::Plugin -Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use mixin 'Kwiki::Installer';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use HTTP::Server::Simple::Kwiki;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 our $VERSION = '0.03';
6  
7 1 const class_id => 'simple_server_http';
8 1 const config_file => 'simple_server_http.yaml';
9  
10 0 ▶sub register {
Subroutine register: not called CC=1 SCAR=6.9
Pod undocumented
11 0 my $register = shift;
12 0 $register->add(command => 'start',
13 description => 'Start a stand-alone kwiki http server');
14 }
15  
16 0 ▶sub handle_start {
Subroutine handle_start: not called CC=2 SCAR=17.9
Pod undocumented
17 0 ▶ my $port = shift || $self->hub->config->simple_server_http_port;
Condition0%0/3
shift() || $self->hub->config->simple_server_http_port
l!l&&r!l&&!r
000
MC/DC0%0/2
shift() || $self->hub->config->simple_server_http_port
shift() $self->hub->config->simple_server_http_port
Truth table0%0/3
A || B
A= shift()B= $self->hub->config->simple_server_http_port
ABresult
1X1
011
000
18 0 my $server = HTTP::Server::Simple::Kwiki->new($port);
19 0 $server->run();
20 }
21  
22 1 __DATA__
↑ Summary