Skip to content

Instantly share code, notes, and snippets.



Created Oct 27, 2017
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
use Mojolicious::Lite;
use Mojo::IOLoop;
get '/' => sub {
my $c = shift;
sub { say 'test1'; Mojo::IOLoop->timer(1 => shift->begin); },
sub { say 'test2'; my $test = 'test'; },
sub { say 'test3'; $c->render(text => 'Hi'); },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment