Skip to content

Instantly share code, notes, and snippets.

@popeshoe
Created March 4, 2014 17:07
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 popeshoe/9350795 to your computer and use it in GitHub Desktop.
Save popeshoe/9350795 to your computer and use it in GitHub Desktop.
use Mojolicious::Lite;
# Route with placeholder
get '/' => sub {
my $self = shift;
$self->render_later;
my $blah = ["this", "should", "load", "chunked"];
foreach my $word (@$blah) {
$self->write_chunk($word . " ");
sleep(1);
}
$self->finish
};
# Start the Mojolicious command system
app->start;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment