Skip to content

Instantly share code, notes, and snippets.

@bimmerlabs bimmerlabs/myapp.pl
Created Oct 27, 2017

Embed
What would you like to do?
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
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
You can’t perform that action at this time.