• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

inc/Module/H05-Jan-2011-1,9881,489

lib/Catalyst/Action/H05-Jan-2011-16449

t/H05-Jan-2011-154104

ChangesH A D05-Jan-20111.7 KiB6044

MANIFESTH A D05-Jan-2011454 2221

META.ymlH A D05-Jan-2011731 3130

Makefile.PLH A D03-May-2022509 2215

READMEH A D05-Jan-20113 KiB8664

README

1NAME
2    Catalyst::Action::RenderView - Sensible default end action.
3
4SYNOPSIS
5        sub end : ActionClass('RenderView') {}
6
7DESCRIPTION
8    This action implements a sensible default end action, which will forward
9    to the first available view, unless "$c->res->status" is a 3xx code
10    (redirection, not modified, etc.), 204 (no content), or "$c->res->body"
11    has already been set. It also allows you to pass "dump_info=1" to the
12    url in order to force a debug screen, while in debug mode.
13
14    If you have more than one view, you can specify which one to use with
15    the "default_view" config setting and the "current_view" and
16    "current_view_instance" stash keys (see Catalyst's "$c->view($name)"
17    method -- this module simply calls "$c->view" with no argument).
18
19METHODS
20  end
21    The default "end" action. You can override this as required in your
22    application class; normal inheritance applies.
23
24INTERNAL METHODS
25  execute
26    Dispatches control to superclasses, then forwards to the default View.
27
28    See "METHODS/action" in Catalyst::Action.
29
30SCRUBBING OUTPUT
31    When you force debug with dump_info=1, RenderView is capable of removing
32    classes from the objects in your stash. By default it will replace any
33    DBIx::Class resultsource objects with the class name, which cleans up
34    the debug output considerably, but you can change what gets scrubbed by
35    setting a list of classes in
36    $c->config->{'Action::RenderView'}->{ignore_classes}. For instance:
37
38        $c->config->{'Action::RenderView'}->{ignore_classes} = [];
39
40    To disable the functionality. You can also set
41    config->{'Action::RenderView'}->{scrubber_func} to change what it does
42    with the classes. For instance, this will undef it instead of putting in
43    the class name:
44
45        $c->config->{'Action::RenderView'}->{scrubber_func} = sub { undef $_ };
46
47  Deprecation notice
48    This plugin used to be configured by setting "$c->config->{debug}". That
49    configuration key is still supported in this release, but is deprecated,
50    please use the 'Action::RenderView' namespace as shown above for
51    configuration in new code.
52
53EXTENDING
54    To add something to an "end" action that is called before rendering,
55    simply place it in the "end" method:
56
57        sub end : ActionClass('RenderView') {
58          my ( $self, $c ) = @_;
59          # do stuff here; the RenderView action is called afterwards
60        }
61
62    To add things to an "end" action that are called *after* rendering, you
63    can set it up like this:
64
65        sub render : ActionClass('RenderView') { }
66
67        sub end : Private {
68          my ( $self, $c ) = @_;
69          $c->forward('render');
70          # do stuff here
71        }
72
73AUTHORS
74    Marcus Ramberg <marcus@thefeed.no>
75
76    Florian Ragwitz <rafl@debian.org>
77
78COPYRIGHT
79    Copyright (c) 2006 - 2009 the Catalyst::Action::RenderView "AUTHOR" as
80    listed above.
81
82LICENSE
83    This library is free software. You can redistribute it and/or modify it
84    under the same terms as Perl itself.
85
86