action names are now parameterizable
[catagits/CatalystX-Declare.git] / t / lib / TestApp / ControllerRole / Parameterized.pm
CommitLineData
c2a8165b 1use CatalystX::Declare;
2
dd2759b0 3controller_role TestApp::ControllerRole::Parameterized (Str :$message, Str :$base, Str :$part, Str :$action) {
c2a8165b 4
5 method get_message { $message }
6
7 final action greet under base {
c2a8165b 8 $ctx->response->body( join ':', $self->get_message, $message );
9 }
8d66ec34 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 }
3601c77d 24
25 final action complex as "$part/deep" {
26 $ctx->response->body( "$part/deep under $base" );
27 }
dd2759b0 28
29 final action $action {
30 $ctx->response->body( "$action action" );
31 }
32
33 final action actionalias {
34 $self->$action($ctx);
35 }
8d66ec34 36 }
c2a8165b 37}