Skip to content

Instantly share code, notes, and snippets.

@nihen
Created May 25, 2012 04:24
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 nihen/2785757 to your computer and use it in GitHub Desktop.
Save nihen/2785757 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
my $app = sub {
my $env = shift;
return sub {
my $responder = shift;
my $writer = $responder->([ 200, []]);
for ( 1..5 ) {
$writer->write("hoge");
sleep 1;
}
$writer->close;
};
};
$app;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment