package MyApp::Controller::Example; use MooseX::MojoControllerExposingAttributes; # applies this role! ...
This is a role that is designed to be consumed by Mojolicious::Controller subclasses to provide them with the
controller_method_name method that is required by the
You don't want to manually consume this role, but rather use the MMooseX::MojoControllerExposingAttributes module to set things up for you.
This method simply asks the consumer's metaclass what the correct read method is for the attribute exposed to Mojolicious as the passed value is.