Created
January 9, 2010 16:30
-
-
Save vkgtaro/272974 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use utf8; | |
use AnyEvent; | |
use Plack::Builder; | |
use IO::Handle::Util qw(io_from_getline); | |
my $hanlder = sub { | |
my $env = shift; | |
my $body = io_from_getline sub { | |
sleep 1; | |
return time . "hi!\n"; | |
}; | |
return [ 200, [ "Content-Type" => 'text/plain', ], $body ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment