summaryrefslogtreecommitdiffhomepage
path: root/test/perl/streaming_body/psgi.pl
blob: a3e54ee07bd8242de31371111972dc83ed09231a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
my $app = sub {
    my ($environ) = @_;

    return sub {
      my $writer = (my $responder = shift)->([200, [
          'Content-Type' => 'text/plain',
          'Content-Length' => '12'
      ]]);

      $writer->write("Hello World!");
      $writer->close;
    };
};