File Coverage

blib/lib/IOMux/HTTP/Server.pm
Criterion Covered Total %
statement 18 25 72.0
branch 0 2 0.0
condition 0 2 0.0
subroutine 6 7 85.7
pod 0 1 0.0
total 24 37 64.8


line stmt bran cond sub pod time code
1             # Copyrights 2011 by Mark Overmeer.
2             # For other contributors see ChangeLog.
3             # See the manual pages for details on the licensing terms.
4             # Pod stripped from pm file by OODoc 1.07.
5 1     1   1818 use warnings;
  1         2  
  1         41  
6 1     1   6 use strict;
  1         3  
  1         50  
7              
8             package IOMux::HTTP::Server;
9 1     1   6 use vars '$VERSION';
  1         2  
  1         58  
10             $VERSION = '0.11';
11              
12 1     1   6 use base 'IOMux::Service::TCP';
  1         2  
  1         965  
13              
14 1     1   2753 use IOMux::HTTP::Service;
  1         3  
  1         27  
15              
16 1     1   6 use Log::Report 'iomux-http';
  1         3  
  1         5  
17              
18              
19             sub init($)
20 0     0 0   { my ($self, $args) = @_;
21 0   0       $args->{conn_type} ||= 'IOMux::HTTP::Service';
22              
23 0 0         my $handler = $args->{handler}
24             or error __x"HTTP server {name} requires a handler for new incoming"
25             , name => $self->name;
26 0           push @{$args->{conn_opts}}, handler => $handler;
  0            
27              
28 0           $self->SUPER::init($args);
29 0           $self;
30             }
31              
32             1;