Catalyst::Engine(3pm)
π Catalyst::Engine π
okay so bestie, you found it: the manual page for Catalyst::Engine, from the User Contributed Perl Documentation. This is the base class energy right here β the thing that actually talks to your server and makes your app go. Let's get into it π
β¨ NAME β¨
Catalyst::Engine β The Catalyst Engine. that's it. that's the whole name. iconic π
β¨ SYNOPSIS β¨
okay so the synopsis is literally just:
See Catalyst.
and honestly? valid. go look at Catalyst. this page is the engine's own business π¦
β¨ DESCRIPTION β¨
(no description, bestie. the vibes speak for themselves. moving on β¨)
β¨ METHODS β¨
welcome to the method section, this is where the real stuff lives. buckle up πΈ
π« $self->finalize_body($c)
Finalize body. Prints the response output as a blocking stream if it looks like a filehandle β otherwise it writes it out all in one go. And if there's no body in the response, we assume you're handling it 'manually', like for nonblocking style or asynchronous streaming responses. You do that by calling write several times (which sends HTTP headers if needed) or you close over $response->write_fh.
See write in Catalyst::Response and write_fh in Catalyst::Response for more. π«Ά
π« $self->finalize_cookies($c)
Creates CGI::Simple::Cookie objects from $c->res->cookies, and sets them as response headers. cookie time, no cap πͺ
π« $self->finalize_error($c)
Output an appropriate error message. Called if there's an error in $c after the dispatch has finished. It'll output debug messages if Catalyst is in debug mode, or a please come back later message otherwise. π
π« $self->finalize_headers($c)
Allows engines to write headers to response. simple as that β¨
π« $self->finalize_uploads($c)
Clean up after uploads, deleting temp files. we love a responsible queen π§Ή
π« $self->prepare_body($c)
sets up the Catalyst::Request object body using HTTP::Body. periodt π
π« $self->prepare_body_chunk($c)
Add a chunk to the request body. π§©
π« $self->prepare_body_parameters($c)
Sets up parameters from body.
π« $self->prepare_parameters($c)
Sets up parameters from query and post parameters. If parameters have already been set up, it will clear existing parameters and set up again. reset era π
π« $self->prepare_path($c)
abstract method, implemented by engines. so like, not our problem bestie π
π« $self->prepare_request($c)
(no extra notes on this one, she's just here π)
π« $self->prepare_query_parameters($c)
process the query string and extract query parameters.
π« $self->prepare_read($c)
Prepare to read by initializing the Content-Length from headers. π
π« $self->prepare_request(@arguments)
Populate the context object from the request object. (yes she shares a name with the other prepare_request up there β that's how the original lists it, we don't ask questions π)
π« $self->prepare_uploads($c)
(no notes, just vibes β¨)
π« $self->write($c, $buffer)
Writes the buffer to the client. π¨
π« $self->unencoded_write($c, $buffer)
Writes the buffer to the client without encoding. Necessary for already encoded buffers. Used when a $c->write has been done followed by $c->res->body. don't double-encode, bestie π€
π« $self->read($c, [$maxlength])
Reads from the input stream by calling $self->read_chunk.
Maintains the read_length and read_position counters as data is read. π
π« $self->read_chunk($c, \$buffer, $length)
Each engine implements read_chunk as its preferred way of reading a chunk of data. Returns the number of bytes read. A return of 0 indicates that there is no more data to be read. π
π« $self->run($app, $server)
Start the engine. Builds a PSGI application and calls the run method on the server passed in, which then causes the engine to loop, handling requests.. (two periods, we keep the punctuation exactly, slay π₯)
π« build_psgi_app ($app, @args)
Builds and returns a PSGI application closure. (Raw, not wrapped in middleware.) π¦
π« $self->unescape_uri($uri)
Unescapes a given URI using the most efficient method available. Engines such as Apache may implement this using Apache's C-based modules, for example. speed queen β‘
π« $self->finalize_output
<obsolete>, see finalize_body. she's retired but we still respect her π
π« $self->env
Hash containing environment variables including many special variables inserted by WWW server β like SERVER_*, REMOTE_*, HTTP_* ... π
Before accessing environment variables consider whether the same information is not directly available via Catalyst objects $c->request, $c->engine ...
BEWARE β οΈ: If you really need to access some environment variable from your Catalyst application you should use$c->engine->env->{VARNAME}instead of$ENV{VARNAME}, as in some environments the%ENVhash does not contain what you would expect. fr fr, don't get got by this one π
β¨ AUTHORS β¨
Catalyst Contributors, see Catalyst.pm. the whole squad π«Ά
β¨ COPYRIGHT β¨
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. π open source queen behavior π
and that's the page, bestie π β this was Catalyst::Engine(3pm) from the User Contributed Perl Documentation, and the footer said perl v5.40.0 with a date of 2024-11-15. now go build something iconic πβ¨
π¦ where this page comes from
- debian trixie: libcatalyst-perl 5.90132-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-perl 5.90132-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-perl 5.90132-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms