'under' and 'as' are parameterizable
[catagits/CatalystX-Declare.git] / t / lib / TestApp / ControllerRole / Parameterized.pm
index 6248da2..10ffc62 100644 (file)
@@ -1,10 +1,25 @@
 use CatalystX::Declare;
 
-controller_role TestApp::ControllerRole::Parameterized (Str :$message) {
+controller_role TestApp::ControllerRole::Parameterized (Str :$message, Str :$base, Str :$part) {
 
     method get_message { $message }
 
     final action greet under base {
         $ctx->response->body( join ':', $self->get_message, $message );
     }
+
+    final action dynabase under "$base" {
+        $ctx->response->body( "under $base" );
+    }
+
+    final action dynapart under "$base" as $part {
+        $ctx->response->body( "under $base as $part" );
+    }
+
+    under $base {
+
+        final action scoped {
+            $ctx->response->body( "scoped under $base" );
+        }
+    }
 }