1Catalyst::Engine(3)   User Contributed Perl Documentation  Catalyst::Engine(3)
2
3
4

NAME

6       Catalyst::Engine - The Catalyst Engine
7

SYNOPSIS

9       See Catalyst.
10

DESCRIPTION

METHODS

13   $self->finalize_body($c)
14       Finalize body.  Prints the response output as blocking stream if it
15       looks like a filehandle, otherwise write it out all in one go.  If
16       there is no body in the response, we assume you are handling it
17       'manually', such as for nonblocking style or asynchronous streaming
18       responses.  You do this by calling "write" several times (which sends
19       HTTP headers if needed) or you close over "$response->write_fh".
20
21       See "write" in Catalyst::Response and "write_fh" in Catalyst::Response
22       for more.
23
24   $self->finalize_cookies($c)
25       Create CGI::Simple::Cookie objects from $c->res->cookies, and set them
26       as response headers.
27
28   $self->finalize_error($c)
29       Output an appropriate error message. Called if there's an error in $c
30       after the dispatch has finished. Will output debug messages if Catalyst
31       is in debug mode, or a `please come back later` message otherwise.
32
33   $self->finalize_headers($c)
34       Allows engines to write headers to response
35
36   $self->finalize_uploads($c)
37       Clean up after uploads, deleting temp files.
38
39   $self->prepare_body($c)
40       sets up the Catalyst::Request object body using HTTP::Body
41
42   $self->prepare_body_chunk($c)
43       Add a chunk to the request body.
44
45   $self->prepare_body_parameters($c)
46       Sets up parameters from body.
47
48   $self->prepare_parameters($c)
49       Sets up parameters from query and post parameters.  If parameters have
50       already been set up will clear existing parameters and set up again.
51
52   $self->prepare_path($c)
53       abstract method, implemented by engines.
54
55   $self->prepare_request($c)
56   $self->prepare_query_parameters($c)
57       process the query string and extract query parameters.
58
59   $self->prepare_read($c)
60       Prepare to read by initializing the Content-Length from headers.
61
62   $self->prepare_request(@arguments)
63       Populate the context object from the request object.
64
65   $self->prepare_uploads($c)
66   $self->write($c, $buffer)
67       Writes the buffer to the client.
68
69   $self->unencoded_write($c, $buffer)
70       Writes the buffer to the client without encoding. Necessary for already
71       encoded buffers. Used when a $c->write has been done followed by
72       $c->res->body.
73
74   $self->read($c, [$maxlength])
75       Reads from the input stream by calling "$self->read_chunk".
76
77       Maintains the read_length and read_position counters as data is read.
78
79   $self->read_chunk($c, \$buffer, $length)
80       Each engine implements read_chunk as its preferred way of reading a
81       chunk of data. Returns the number of bytes read. A return of 0
82       indicates that there is no more data to be read.
83
84   $self->run($app, $server)
85       Start the engine. Builds a PSGI application and calls the run method on
86       the server passed in, which then causes the engine to loop, handling
87       requests..
88
89   build_psgi_app ($app, @args)
90       Builds and returns a PSGI application closure. (Raw, not wrapped in
91       middleware)
92
93   $self->unescape_uri($uri)
94       Unescapes a given URI using the most efficient method available.
95       Engines such as Apache may implement this using Apache's C-based
96       modules, for example.
97
98   $self->finalize_output
99       <obsolete>, see finalize_body
100
101   $self->env
102       Hash containing environment variables including many special variables
103       inserted by WWW server - like SERVER_*, REMOTE_*, HTTP_* ...
104
105       Before accessing environment variables consider whether the same
106       information is not directly available via Catalyst objects $c->request,
107       $c->engine ...
108
109       BEWARE: If you really need to access some environment variable from
110       your Catalyst application you should use $c->engine->env->{VARNAME}
111       instead of $ENV{VARNAME}, as in some environments the %ENV hash does
112       not contain what you would expect.
113

AUTHORS

115       Catalyst Contributors, see Catalyst.pm
116
118       This library is free software. You can redistribute it and/or modify it
119       under the same terms as Perl itself.
120
121
122
123perl v5.34.0                      2021-07-22               Catalyst::Engine(3)
Impressum