Merged 5.49_01 (r1339) from refactored branch to trunk
[catagits/Catalyst-Runtime.git] / t / live / lib / TestApp / Controller / Action / Streaming.pm
diff --git a/t/live/lib/TestApp/Controller/Action/Streaming.pm b/t/live/lib/TestApp/Controller/Action/Streaming.pm
new file mode 100644 (file)
index 0000000..9ad394c
--- /dev/null
@@ -0,0 +1,17 @@
+package TestApp::Controller::Action::Streaming;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub streaming : Global {
+    my ( $self, $c ) = @_;
+    for my $line ( split "\n", <<'EOF' ) {
+foo
+bar
+baz
+EOF
+        $c->res->write("$line\n");
+    }
+}
+
+1;