Update docs
Nilson Santos Figueiredo JĂșnior [Fri, 6 Feb 2009 02:24:24 +0000 (02:24 +0000)]
lib/Catalyst/View/Component/SubInclude/ESI.pm
lib/Catalyst/View/Component/SubInclude/SubRequest.pm
lib/Catalyst/View/Component/SubInclude/Visit.pm

index e8f446f..635d978 100644 (file)
@@ -39,11 +39,13 @@ uses of includes.
 
 =head1 CLASS METHODS
 
-=head2 C<generate_subinclude( $c, @args )>
+=head2 C<generate_subinclude( $c, $path, @args )>
 
-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 '<!--esi <esi:include src="$url" /> -->';
 
 Notice that the stash will always be empty. This behavior could be configurable
index 982c0a6..baedb69 100644 (file)
@@ -55,13 +55,17 @@ It requires L<Catalyst::Plugin::SubRequest>.
 
 =head2 C<generate_subinclude( $c, $path, @args )>
 
-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
 
index b5fd93b..bc7fe01 100644 (file)
@@ -40,14 +40,22 @@ render subinclude contents.
 
 This method is only supported when using L<Catalyst> version 5.71000 or newer.
 
+B<WARNING: As of Catalyst version 5.71000, this plugin doesn't work for chained 
+actions with captured arguments>. Apparently, C<visit> doesn't handle this type 
+of actions yet.
+
 =head1 CLASS METHODS
 
 =head2 C<generate_subinclude( $c, $path, @args )>
 
-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 {