Created
October 27, 2017 14:39
-
-
Save bimmerlabs/d5891302a3d0593a995ef2cd3c131497 to your computer and use it in GitHub Desktop.
If I comment out the line with 'test2' it works - but otherwise, it times out. What am I missing? taken from http://bit.ly/2zJHEK1
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 Mojolicious::Lite; | |
use Mojo::IOLoop; | |
get '/' => sub { | |
my $c = shift; | |
$c->delay( | |
sub { say 'test1'; Mojo::IOLoop->timer(1 => shift->begin); }, | |
sub { say 'test2'; my $test = 'test'; }, | |
sub { say 'test3'; $c->render(text => 'Hi'); }, | |
); | |
}; | |
app->start; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment