Catalyst::ActionRole::Methods This is a Catalyst extension which adds additional dispatch based on the HTTP method, in the same way Catalyst::Action::REST does: An action which does this role will be matched and run as usual. But after it returns, a sub-action will also run, which will be identified by taking the name of the main action and appending an underscore and the HTTP request method name. This sub-action is passed the same captures and args as the main action. You can also write the sub-action as a plain method without declaring it as an action. Probably the only advantage of declaring it as an action is that other action roles can then be applied to it. There are several fallbacks if a sub-action for the current request method does not exist: 1. "HEAD" requests will try to use the sub-action for "GET". 2. "OPTIONS" requests will set up a 204 (No Content) response. 3. The "not_implemented" sub-action is tried as a last resort. 4. Finally, a 405 (Method Not Found) response is set up. Both fallback responses include an "Allow" header which will be populated from the available sub-actions. Note that this action role only *adds* dispatch. It does not affect matching! The main action will always run if it otherwise matches the request, even if no suitable sub-action exists and a 405 is generated. Nor does it affect chaining. All subsequent actions in a chain will still run, along with their sub-actions. INSTALLATION This is a Perl module distribution. It should be installed with whichever tool you use to manage your installation of Perl, e.g. any of cpanm . cpan . cpanp -i . Consult http://www.cpan.org/modules/INSTALL.html for further instruction. Should you wish to install this module manually, the procedure is perl Makefile.PL make make test make install COPYRIGHT AND LICENSE This software is copyright (c) 2024 by Aristotle Pagaltzis. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.