X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FInternals.pod;h=6bc936054482b8cffe5da7c7c938e45bb5b78294;hb=e5429fee2de5b8f0046ea53dd5a2ede04bcb1a9d;hp=8e7a1bced6efdfe23b856896e83d2c5554121981;hpb=5c57dc98a26e653927d331817f09267260cd3f63;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Manual/Internals.pod b/lib/Catalyst/Manual/Internals.pod index 8e7a1bc..6bc9360 100644 --- a/lib/Catalyst/Manual/Internals.pod +++ b/lib/Catalyst/Manual/Internals.pod @@ -4,12 +4,13 @@ Catalyst::Manual::Internals - Catalyst Internals =head1 DESCRIPTION -This document provides an overview of the internals of Catalyst. As Catalyst -is still developing rapidly details may become out of date. +This document provides an 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. - =head2 Initialization Catalyst initializes itself in two stages (I may be wrong in some of @@ -19,18 +20,19 @@ the details here - AF): =item 1 -When the Catalyst module is imported in the main application module it -evaluates any options (C<-Debug>, C<-Engine=XXX>) and loads any specified -plugins, making application module inherit from the plugin classes. It also -sets up a default log object and ensures that the application module inherits -from C and from the selected specialized Engine module. +When the Catalyst module is imported in the main application +module it evaluates any options (C<-Debug>, C<-Engine=XXX>) +and loads any specified plugins, making the application module +inherit from the plugin classes. It also sets up a default log +object and ensures that the application module inherits from +C and from the selected specialized Engine module. =item 2 When the application module makes the first call to C<< __PACKAGE__->action() >> -(implemented in C) Catalyst automatically loads all -components it finds in the C<$class\::Controller>, C<$class\::C>, -C<$class\::Model>, C<$class\::M>, C<$class\::View> and C<$class\::V> +(implemented in C), Catalyst automatically loads all +components it finds in the C<$class::Controller>, C<$class::C>, +C<$class::Model>, C<$class::M>, C<$class::View> and C<$class::V> namespaces (using C). A table of actions is built up and added to on subsequent calls to C. @@ -40,7 +42,7 @@ and added to on subsequent calls to C. =head2 Request Lifecycle For each request Catalyst builds a I object, which includes -information about the request, and searches the action table for matching +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 @@ -51,17 +53,19 @@ extend Catalyst. handler prepare prepare_request - prepare_path - prepare_cookies - prepare_headers prepare_connection + prepare_headers + prepare_cookies + prepare_path prepare_action + prepare_body prepare_parameters prepare_uploads - process + dispatch finalize + finalize_cookies finalize_headers - finalize_output + finalize_body These steps are normally overloaded from engine classes, and may also be extended by plugins. Extending means using multiple inheritance with L.