|
NAMECatalyst::Manual::Internals - Catalyst Internals DESCRIPTIONThis document provides a brief overview of the internals of Catalyst. As Catalyst is still developing rapidly, details may become out of date: please treat this as a guide, and look at the source for the last word. The coverage is split into initialization and request lifecycle. InitializationCatalyst initializes itself in two stages:
Request LifecycleFor each request Catalyst builds a context object, which includes information about the request, and then searches the action table for matching actions. The handling of a request can be divided into three stages: preparation of the context, processing of the request, and finalization of the response. These are the steps of a Catalyst request in detail; every step can be overloaded to extend Catalyst. handle_request
prepare
prepare_request
prepare_connection
prepare_query_parameters
prepare_headers
prepare_cookies
prepare_path
prepare_body (unless parse_on_demand)
prepare_body_parameters
prepare_parameters
prepare_uploads
prepare_action
dispatch
finalize
finalize_uploads
finalize_error (if one happened)
finalize_headers
finalize_cookies
finalize_body
These steps are normally overloaded from engine classes, and may also be extended by plugins. For more on extending Catalyst, see Catalyst::Manual::ExtendingCatalyst. The engine class populates the Catalyst request object with information from the underlying layer (PSGI) during the prepare phase, then push the generated response information down to the underlying layer during the finalize phase. AUTHORSCatalyst Contributors, see Catalyst.pm COPYRIGHTThis library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
|