
PSA::Acceptor::HTTP - raw HTTP acceptor for PSA applications

use PSA qw(Request::HTTP Acceptor::HTTP Response::HTTP);
# defaults to port 80, or 8080 for users
my $acceptor = PSA::Acceptor::HTTP->new();
# note: this forks!
while (my $request = $acceptor->get_request) {
my $psa = PSA->new
(acceptor => $acceptor,
request => $request,
response => PSA::Response::HTTP->new());
# process $request
if ($psa->response->is_template) {
# issue template response
} else {
$psa->response->issue();
}
}

PSA::Acceptor::HTTP cuts out the need for a web server for those situations where it is inconvenient to set one up, or for when you are using a braindead web server that doesn't support FastCGI.
Note that without root privileges you won't be able to listen on port 80 on Unix systems. To avoid this problem, when running as a user, the default port is 8080.
Returns a PSA::Request object, or undef if there are none.
Returns the filehandle (either an IO::Handle or a ref GLOB) to write to to respond to this request
Sam Vilain, <sv@snowcra.sh>