X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FView%2FComponent%2FSubInclude.pm;h=77c5945c4c953d85ffddb39f83691aa516894bfc;hb=e88af2835e002b378e700d70a81912b493b40b1f;hp=db04ebb50f1af151a940f1c1ba279fad38a57c6f;hpb=ada1ae3c160cdae020acd8fa49a3913b8fb7f704;p=catagits%2FCatalyst-View-Component-SubInclude.git diff --git a/lib/Catalyst/View/Component/SubInclude.pm b/lib/Catalyst/View/Component/SubInclude.pm index db04ebb..77c5945 100644 --- a/lib/Catalyst/View/Component/SubInclude.pm +++ b/lib/Catalyst/View/Component/SubInclude.pm @@ -10,11 +10,11 @@ Catalyst::View::Component::SubInclude - Use subincludes in your Catalyst views =head1 VERSION -Version 0.01 +Version 0.02 =cut -our $VERSION = '0.01'; +our $VERSION = '0.02'; =head1 SYNOPSIS @@ -35,7 +35,7 @@ Then, somewhere in your templates: C allows you to include content in your templates (or, more generally, somewhere in your view's C processing) which comes from another action in your application. It's implemented as a -L, so using L in your view is required. +L, so using L in your view is required. Simply put, it's a way to include the output of a Catalyst sub-request somewhere in your page. @@ -53,12 +53,14 @@ common use-case). =head2 C -This will return the body of the requested resource (as specified by C<$path>). +This will render and return the body of the included resource (as specified by +C<$path>). =head1 SUBINCLUDE PLUGINS The module comes with two subinclude plugins: -L and +L, +L and L. By default, the SubRequest plugin will be used. This can be changed in the @@ -71,6 +73,13 @@ Configuration file example: subinclude_plugin ESI +If writing your own plugin, keep in kind plugins are required to implement a +class method C with the following signature: + + sub generate_subinclude { + my ($class, $c, @args) = @_; + } + =cut has 'subinclude_plugin' => ( @@ -108,7 +117,8 @@ around 'render' => sub { =head1 SEE ALSO -L, L, L, +L, +L, L, L =head1 BUGS