'under' and 'as' are parameterizable
[catagits/CatalystX-Declare.git] / t / lib / TestApp / ControllerRole / Parameterized.pm
1 use CatalystX::Declare;
2
3 controller_role TestApp::ControllerRole::Parameterized (Str :$message, Str :$base, Str :$part) {
4
5     method get_message { $message }
6
7     final action greet under base {
8         $ctx->response->body( join ':', $self->get_message, $message );
9     }
10
11     final action dynabase under "$base" {
12         $ctx->response->body( "under $base" );
13     }
14
15     final action dynapart under "$base" as $part {
16         $ctx->response->body( "under $base as $part" );
17     }
18
19     under $base {
20
21         final action scoped {
22             $ctx->response->body( "scoped under $base" );
23         }
24     }
25 }