fixed bug with under block leaking its setting to following actions
[catagits/CatalystX-Declare.git] / t / lib / TestApp / Controller / UnderSequence.pm
diff --git a/t/lib/TestApp/Controller/UnderSequence.pm b/t/lib/TestApp/Controller/UnderSequence.pm
new file mode 100644 (file)
index 0000000..e5ba665
--- /dev/null
@@ -0,0 +1,19 @@
+use CatalystX::Declare;
+
+controller TestApp::Controller::UnderSequence {
+
+    action base under '/' as 'under_seq';
+
+    under base {
+
+        final action foo { $ctx->response->body('foo') }
+
+        action bar;
+
+        under bar { final action test_bar { $ctx->response->body('bar') } }
+
+        action baz;
+
+        under baz { final action test_baz { $ctx->response->body('baz') } }
+    }
+}