NAME

CatalystX::Declare::Keyword::Role - Declare Catalyst Controller Roles

SYNOPSIS

use CatalystX::Declare;

component_role MyApp::Web::ControllerRole::Foo {

    method provided_method { ... }

    action foo, under base, is final { ... }

    around bar_action (Object $ctx) { ... }
}

DESCRIPTION

This handler provides the component_role keyword. It is an extension of the MooseX::Declare::Syntax::Keyword::Role handler. Like with declared controllers, the method keyword and the modifiers are provided. For details on the syntax for action declarations have a look at CatalystX::Declare::Keyword::Action, which also documents the effects of method modifiers on actions.

SUPERCLASSES

MooseX::Declare::Syntax::Keyword::Role

METHODS

add_namespace_customizations

Object->add_namespace_customizations (Object $ctx, Str $package)

This hook is called by MooseX::Declare and will set the package up as a role and apply MooseX::MethodAttributes.

default_inner

ArrayRef[Object] Object->default_inner ()

Same as "default_inner" in CatalystX::Declare::Keyword::Class.

SEE ALSO

CatalystX::Declare
"role" in MooseX::Declare
CatalystX::Declare::Keyword::Action
CatalystX::Declare::Keyword::Controller

AUTHOR

See "AUTHOR" in CatalystX::Declare for author information.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as perl itself.