Catalyst::Engine(3pm)

πŸ“¦
version 5.90132 Β· 6 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 %ENV hash 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 🫢


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