The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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

Now View found

If there's no view found when calling '$c->view()' we throw Catalyst::ActionRole::RenderView::Utils::NoView

AUTHOR

  John Napiorkowski <jnapiork@cpan.org>
 

COPYRIGHT

Copyright (c) 2022 the above named AUTHOR

LICENSE

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