From 3f21aac657ff567913ef6eca762c44b2871e426a Mon Sep 17 00:00:00 2001 From: Nilson Santos Figueiredo Junior Date: Fri, 6 Feb 2009 02:24:24 +0000 Subject: [PATCH] Update docs --- lib/Catalyst/View/Component/SubInclude/ESI.pm | 8 +++++--- lib/Catalyst/View/Component/SubInclude/SubRequest.pm | 10 +++++++--- lib/Catalyst/View/Component/SubInclude/Visit.pm | 10 +++++++++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/lib/Catalyst/View/Component/SubInclude/ESI.pm b/lib/Catalyst/View/Component/SubInclude/ESI.pm index e8f446f..635d978 100644 --- a/lib/Catalyst/View/Component/SubInclude/ESI.pm +++ b/lib/Catalyst/View/Component/SubInclude/ESI.pm @@ -39,11 +39,13 @@ uses of includes. =head1 CLASS METHODS -=head2 C +=head2 C -This will roughly translate to the following code: +Note that C<$path> should be the private action path - translation to the public +path is handled internally. After translation, this will roughly translate to +the following code: - my $url = $c->uri_for( @args ); + my $url = $c->uri_for( $translated_path, @args )->path_query; return ''; Notice that the stash will always be empty. This behavior could be configurable diff --git a/lib/Catalyst/View/Component/SubInclude/SubRequest.pm b/lib/Catalyst/View/Component/SubInclude/SubRequest.pm index 982c0a6..baedb69 100644 --- a/lib/Catalyst/View/Component/SubInclude/SubRequest.pm +++ b/lib/Catalyst/View/Component/SubInclude/SubRequest.pm @@ -55,13 +55,17 @@ It requires L. =head2 C -This will translate to the following sub-request call: +This will make a sub-request call to the action specified by C<$path>. Note that +C<$path> should be the private action path - translation to the public path is +handled internally. - $c->sub_request( $path, {}, @args ); +So, after path translation, the call will be (roughly) equivalent to: + + $c->sub_request( $translated_path, {}, @args ); Notice that the stash will always be empty. This behavior could be configurable in the future through an additional switch - for now, this behavior guarantees a -common interface for plugins. +common interface for all plugins. =cut diff --git a/lib/Catalyst/View/Component/SubInclude/Visit.pm b/lib/Catalyst/View/Component/SubInclude/Visit.pm index b5fd93b..bc7fe01 100644 --- a/lib/Catalyst/View/Component/SubInclude/Visit.pm +++ b/lib/Catalyst/View/Component/SubInclude/Visit.pm @@ -40,14 +40,22 @@ render subinclude contents. This method is only supported when using L version 5.71000 or newer. +B. Apparently, C doesn't handle this type +of actions yet. + =head1 CLASS METHODS =head2 C -This will translate to the following call: +This is (roughly) equivalent to the following call: $c->visit( $path, @args ); +But it will handle all the nasty details such as localizing the stash, +parameters and response body. This is necessary to keep behavior consistent +with the other plugins. + =cut sub generate_subinclude {