NAME

Catalyst::ActionRole::RenderView - Call the default view

SYNOPSIS

package Example::Controller::Root;

use Moose;
use MooseX::MethodAttributes;

extends 'Catalyst::Controller';

sub end : Action Does(RenderView) {}

DESCRIPTION

This is basically Catalyst::Action::RenderView done as an action role (basically a Moose role) rather than as a base class. This is a bit more flexible if you plan to do fancy stuff with your end action.

Two things it doesn't do that the classic Catalyst::Action::RenderView does is it doesn't set a default content type if none is found (old one just set text/html which was probably ok back in the 'Aughts but not always true now) and we don't support the dump_info when in debug mode since I really think something like that belongs in another part of the stack.

I'm willing to be proven wrong, just send me your use cases and patches.

EXCEPTIONS

This class can throw the following exceptions which are compatible with CatalystX::Errors

No View found

If there's no view found when calling '$c->view()' we throw Catalyst::ActionRole::RenderView::Utils::NoView. You can use CatalystX::Errors to catch and handle that or roll your own error handling.

AUTHOR

 John Napiorkowski <jnapiork@cpan.org>

COPYRIGHT

Copyright (c) 2023 the above named AUTHOR

LICENSE

You may distribute this code under the same terms as Perl itself.