AnyEvent-FCGI
view release on metacpan or search on metacpan
lib/AnyEvent/FCGI/Request.pm view on Meta::CPAN
port => 9000,
on_request => sub {
my $request = shift;
local *STDIN; open STDIN, '<', \$request->read_stdin;
local %ENV = %{$request->params};
local $CGI::Q = new CGI::Stateless;
$request->respond(
'Hello, ' . (CGI::param('name') || 'anonymous'),
'Content-Type' => 'text/html; charset=utf8',
'Set-Cookie' => 'cookie_a=1; path=/',
'Set-Cookie' => 'cookie_b=2; path=/',
);
}
);
AnyEvent->loop;
=head1 DESCRIPTION
( run in 0.923 second using v1.01-cache-2.11-cpan-49f99fa48dc )