1Catalyst::Action::RendeUrsVeirewC(o3n)tributed Perl DocuCmaetnatlaytsito:n:Action::RenderView(3)
2
3
4

NAME

6       Catalyst::Action::RenderView - Sensible default end action.
7

SYNOPSIS

9           sub end : ActionClass('RenderView') {}
10

DESCRIPTION

12       This action implements a sensible default end action, which will
13       forward to the first available view, unless "$c->res->status" is a 3xx
14       code (redirection, not modified, etc.), 204 (no content), or
15       "$c->res->body" has already been set. It also allows you to pass
16       "dump_info=1" to the url in order to force a debug screen, while in
17       debug mode.
18
19       If you have more than one view, you can specify which one to use with
20       the "default_view" config setting and the "current_view" and
21       "current_view_instance" stash keys (see Catalyst's "$c->view($name)"
22       method -- this module simply calls "$c->view" with no argument).
23

METHODS

25   end
26       The default "end" action. You can override this as required in your
27       application class; normal inheritance applies.
28

INTERNAL METHODS

30   execute
31       Dispatches control to superclasses, then forwards to the default View.
32
33       See "METHODS/action" in Catalyst::Action.
34

SCRUBBING OUTPUT

36       When you force debug with dump_info=1, RenderView is capable of
37       removing classes from the objects in your stash. By default it will
38       replace any DBIx::Class resultsource objects with the class name, which
39       cleans up the debug output considerably, but you can change what gets
40       scrubbed by setting a list of classes in
41       $c->config->{'Action::RenderView'}->{ignore_classes}.  For instance:
42
43           $c->config->{'Action::RenderView'}->{ignore_classes} = [];
44
45       To disable the functionality. You can also set
46       config->{'Action::RenderView'}->{scrubber_func} to change what it does
47       with the classes. For instance, this will undef it instead of putting
48       in the class name:
49
50           $c->config->{'Action::RenderView'}->{scrubber_func} = sub { undef $_ };
51
52   Deprecation notice
53       This plugin used to be configured by setting "$c->config->{debug}".
54       That configuration key is still supported in this release, but is
55       deprecated, please use the  'Action::RenderView'  namespace as shown
56       above for configuration in new code.
57

EXTENDING

59       To add something to an "end" action that is called before rendering,
60       simply place it in the "end" method:
61
62           sub end : ActionClass('RenderView') {
63             my ( $self, $c ) = @_;
64             # do stuff here; the RenderView action is called afterwards
65           }
66
67       To add things to an "end" action that are called after rendering, you
68       can set it up like this:
69
70           sub render : ActionClass('RenderView') { }
71
72           sub end : Private {
73             my ( $self, $c ) = @_;
74             $c->forward('render');
75             # do stuff here
76           }
77

AUTHORS

79       Marcus Ramberg <marcus@thefeed.no>
80
81       Florian Ragwitz <rafl@debian.org>
82
84       Copyright (c) 2006 - 2009 the Catalyst::Action::RenderView "AUTHOR" as
85       listed above.
86

LICENSE

88       This library is free software. You can redistribute it and/or modify it
89       under the same terms as Perl itself.
90
91
92
93perl v5.36.0                      2022-07-22   Catalyst::Action::RenderView(3)
Impressum