4 use AnyEvent
::HTTPD
::Appgets
;
6 my $httpd = AnyEvent
::HTTPD
->new (port
=> 9090);
12 my ($httpd, $req) = @_;
16 o
"<html><body><h1>Hello World!</h1>";
17 o
"<a href=\"/test\">another test page</a>";
24 my ($httpd, $req) = @_;
27 $t = AnyEvent
->timer (after
=> 2, cb
=> sub {
30 o
`cat /proc/cpuinfo`;
32 $req->respond ([200, "ok", { 'Content-Type' => 'text/plain' }, $o]);