1 package Mogstored
::HTTPServer
;
4 my ($class, %opts) = @_;
5 my $self = bless {}, $class;
6 $self->{docroot
} = delete $opts{docroot
};
7 $self->{listen} = delete $opts{listen};
8 $self->{maxconns
} = delete $opts{maxconns
};
9 $self->{bin
} = delete $opts{bin
};
10 $self->{include
} = delete $opts{include
};
11 die "unknown opts" if %opts;
17 die "start not implemented for $self";
30 my $port = $self->{listen};
32 die "not numeric port?" unless $port =~ /^\d+$/;
38 if ($self->{listen} =~ /^(.+):\d+$/) {
40 } elsif ($self->{listen} =~ /^\d+$/) {
43 die "Bogus listen value?";