.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Catalyst::Action::RenderView 3pm" .TH Catalyst::Action::RenderView 3pm "2022-06-09" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Catalyst::Action::RenderView \- Sensible default end action. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& sub end : ActionClass(\*(AqRenderView\*(Aq) {} .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This action implements a sensible default end action, which will forward to the first available view, unless \f(CW\*(C`$c\->res\->status\*(C'\fR is a 3xx code (redirection, not modified, etc.), 204 (no content), or \f(CW\*(C`$c\->res\->body\*(C'\fR has already been set. It also allows you to pass \f(CW\*(C`dump_info=1\*(C'\fR to the url in order to force a debug screen, while in debug mode. .PP If you have more than one view, you can specify which one to use with the \f(CW\*(C`default_view\*(C'\fR config setting and the \f(CW\*(C`current_view\*(C'\fR and \&\f(CW\*(C`current_view_instance\*(C'\fR stash keys (see Catalyst's \f(CW\*(C`$c\->view($name)\*(C'\fR method \*(-- this module simply calls \f(CW\*(C`$c\->view\*(C'\fR with no argument). .SH "METHODS" .IX Header "METHODS" .SS "end" .IX Subsection "end" The default \f(CW\*(C`end\*(C'\fR action. You can override this as required in your application class; normal inheritance applies. .SH "INTERNAL METHODS" .IX Header "INTERNAL METHODS" .SS "execute" .IX Subsection "execute" Dispatches control to superclasses, then forwards to the default View. .PP See \*(L"METHODS/action\*(R" in Catalyst::Action. .SH "SCRUBBING OUTPUT" .IX Header "SCRUBBING OUTPUT" When you force debug with dump_info=1, RenderView is capable of removing classes from the objects in your stash. By default it will replace any DBIx::Class resultsource objects with the class name, which cleans up the debug output considerably, but you can change what gets scrubbed by setting a list of classes in \&\f(CW$c\fR\->config\->{'Action::RenderView'}\->{ignore_classes}. For instance: .PP .Vb 1 \& $c\->config\->{\*(AqAction::RenderView\*(Aq}\->{ignore_classes} = []; .Ve .PP To disable the functionality. You can also set config\->{'Action::RenderView'}\->{scrubber_func} to change what it does with the classes. For instance, this will undef it instead of putting in the class name: .PP .Vb 1 \& $c\->config\->{\*(AqAction::RenderView\*(Aq}\->{scrubber_func} = sub { undef $_ }; .Ve .SS "Deprecation notice" .IX Subsection "Deprecation notice" This plugin used to be configured by setting \f(CW\*(C`$c\->config\->{debug}\*(C'\fR. That configuration key is still supported in this release, but is deprecated, please use the \f(CW \*(AqAction::RenderView\*(Aq \fR namespace as shown above for configuration in new code. .SH "EXTENDING" .IX Header "EXTENDING" To add something to an \f(CW\*(C`end\*(C'\fR action that is called before rendering, simply place it in the \f(CW\*(C`end\*(C'\fR method: .PP .Vb 4 \& sub end : ActionClass(\*(AqRenderView\*(Aq) { \& my ( $self, $c ) = @_; \& # do stuff here; the RenderView action is called afterwards \& } .Ve .PP To add things to an \f(CW\*(C`end\*(C'\fR action that are called \fIafter\fR rendering, you can set it up like this: .PP .Vb 1 \& sub render : ActionClass(\*(AqRenderView\*(Aq) { } \& \& sub end : Private { \& my ( $self, $c ) = @_; \& $c\->forward(\*(Aqrender\*(Aq); \& # do stuff here \& } .Ve .SH "AUTHORS" .IX Header "AUTHORS" Marcus Ramberg .PP Florian Ragwitz .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2006 \- 2009 the Catalyst::Action::RenderView \*(L"\s-1AUTHOR\*(R"\s0 as listed above. .SH "LICENSE" .IX Header "LICENSE" This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.