dynamic runtime and role fixes
[catagits/CatalystX-Declare.git] / t / lib / TestApp / Controller / DynamicFinal / Bar.pm
diff --git a/t/lib/TestApp/Controller/DynamicFinal/Bar.pm b/t/lib/TestApp/Controller/DynamicFinal/Bar.pm
new file mode 100644 (file)
index 0000000..23739ec
--- /dev/null
@@ -0,0 +1,18 @@
+use CatalystX::Declare;
+
+controller TestApp::Controller::DynamicFinal::Bar {
+
+    with 'TestApp::ControllerRole::DynamicFinal' => {
+        is_final    => 0,
+        base        => 'base',
+        body        => 'bar',
+        counters    => [qw( y z )],
+    };
+
+    action base as df_bar under '/';
+
+    final action wrapped under msg {
+        $ctx->response->body(sprintf 'wrapped[%s]', $ctx->response->body);
+    }
+}
+