action names are now parameterizable
[catagits/CatalystX-Declare.git] / t / lib / TestApp / ControllerRole / Parameterized.pm
index d4e4b11..835daae 100644 (file)
@@ -1,6 +1,6 @@
 use CatalystX::Declare;
 
-controller_role TestApp::ControllerRole::Parameterized (Str :$message, Str :$base, Str :$part) {
+controller_role TestApp::ControllerRole::Parameterized (Str :$message, Str :$base, Str :$part, Str :$action) {
 
     method get_message { $message }
 
@@ -25,5 +25,13 @@ controller_role TestApp::ControllerRole::Parameterized (Str :$message, Str :$bas
         final action complex as "$part/deep" {
             $ctx->response->body( "$part/deep under $base" );
         }
+
+        final action $action {
+            $ctx->response->body( "$action action" );
+        }
+
+        final action actionalias {
+            $self->$action($ctx);
+        }
     }
 }