=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
=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
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 {