action base under '/' as '';
}
+You can currently only use the parameters in action declarations in the body,
+the C<as> path part and the C<under> base action specification:
+
+ controller_role Foo (Str :$base, Str :$part) {
+
+ action foo under $base as $part { ... }
+ }
+
+You can specify the parameters either as plain scalar variables or as quoted
+strings. The latter is especially useful for more complex path parts:
+
+ action foo under $base as "$pathpart/fnord" { ... }
+
=head1 SUPERCLASSES
=over
is get('/param/somebase/dynabase'), 'under somebase', 'dynamic base via parameter';
is get('/param/somebase/somepart'), 'under somebase as somepart', 'dynamic base and path part via parameter';
is get('/param/somebase/scoped'), 'scoped under somebase', 'dynamic base in under scope via parameter';
+is get('/param/somebase/somepart/deep'), 'somepart/deep under somebase', 'more complex strings';
done_testing;
final action scoped {
$ctx->response->body( "scoped under $base" );
}
+
+ final action complex as "$part/deep" {
+ $ctx->response->body( "$part/deep under $base" );
+ }
}
}