=head2 Controller actions in Moose roles
-Declaring actions in Roles is currently unsupported.
+You can use L<MooseX::MethodAttributes::Role> if you want to declare actions
+inside Moose roles.
=head2 Using Moose in Components
=head2 Actions in your application class
Having actions in your application class will now emit a warning at application
-startup as this is deprecated.It is highly recommended that these actions are moved
+startup as this is deprecated. It is highly recommended that these actions are moved
into a MyApp::Controller::Root (as demonstrated by the scaffold application
-generated by catalyst.pl
+generated by catalyst.pl).
-This warning, also affects tests. You should move actions in your test, creating a myTest::Controller::Root, like the following example:
+This warning, also affects tests. You should move actions in your test,
+creating a myTest::Controller::Root, like the following example:
package MyTest::Controller::Root;
-
+
use strict;
use warnings;
-
+
use parent 'Catalyst::Controller';
-
+
__PACKAGE__->config(namespace => '');
-
+
sub action : Local {
my ( $self, $c ) = @_;
$c->do_something;
}
-
+
1;
=head2 ::[MVC]:: naming scheme
Calling the plugin method is deprecated, and calling it at run time is B<highly
deprecated>.
-Instead you are recommended to use L< Catalyst::Model::Adaptor > or similar to
+Instead you are recommended to use L<Catalyst::Model::Adaptor> or similar to
compose the functionality you need outside of the main application name space.
Calling the plugin method will not be supported past Catalyst 5.81.