Created
October 25, 2011 20:57
-
-
Save Akron/1314239 to your computer and use it in GitHub Desktop.
Tidy up when guests are gone (write cb)
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
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
get '/' => sub { | |
my $c = shift; | |
$c->res->headers->content_length(5); | |
$c->write( | |
'Hallo' => sub { | |
my $c = shift; | |
sleep(3); | |
$c->app->log->debug('finished'); | |
} | |
); | |
}; | |
app->start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment