Skip to content

Instantly share code, notes, and snippets.

@Akron
Created September 14, 2011 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akron/1216847 to your computer and use it in GitHub Desktop.
Save Akron/1216847 to your computer and use it in GitHub Desktop.
Render in advance
use Mojolicious::Lite;
get '/' => sub {
my $c = shift;
$c->write_chunk('hi',
sub {
# New c not necessary
$c->finish;
sleep(3);
$c->app->log->debug('check');
});
};
app->start;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment