fixed capture args error in under blocks
[catagits/CatalystX-Declare.git] / t / lib / TestApp / Controller / Foo.pm
index 662f0ac..cbe81f7 100644 (file)
@@ -136,6 +136,17 @@ controller TestApp::Controller::Foo with TestApp::TestRole {
                 action stream is final {
                     $ctx->response->body($ctx->action->reverse);
                 }
+
+                action param (Int $x) { 
+                    $ctx->stash(param_x => $x);
+                }
+
+                under param {
+
+                    final action road (Int $y) {
+                        $ctx->response->body($ctx->stash->{param_x} + $y);
+                    }
+                }
             }
         }
     }