You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AnyEvent works with Mojolicious out of the box, as long as you have the EV module installed.
#!/usr/bin/env perl
use Mojolicious::Lite;
use EV;
use AnyEvent;
# Simple delayed rendering
get '/' => sub {
my $self = shift;
my $w;
$w = AE::timer 3, 0, sub {
$self->render_text('3 seconds delayed!');
undef $w;
};
};
app->start;