subinclude_plugin ESI
</View::TT>
+If writing your own plugin, keep in kind plugins are required to implement a
+class method C<generate_subinclude> with the following signature:
+
+ sub generate_subinclude {
+ my ($class, $c, @args) = @_;
+ }
+
=cut
has 'subinclude_plugin' => (
Varnish (L<http://varnish.projects.linpro.no/>) which allows cache-efficient
uses of includes.
-=head1 STASH FUNCTION
+=head1 CLASS METHODS
-=head2 C<subinclude( @args )>
+=head2 C<generate_subinclude( $c, @args )>
This will roughly translate to the following code:
my $url = $c->uri_for( @args );
- <!--esi <esi:include src="$url" /> -->
+ return '<!--esi <esi:include src="$url" /> -->';
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
use warnings;
use strict;
+use Carp qw/croak/;
+use namespace::clean qw/croak/;
+
=head1 NAME
Catalyst::View::Component::SubInclude::SubRequest - Sub-requests plugin for C::V::Component::SubInclude
It requires L<Catalyst::Plugin::SubRequest>.
-=head1 STASH FUNCTION
+=head1 CLASS METHODS
-=head2 C<subinclude( $path, @args )>
+=head2 C<generate_subinclude( $c, $path, @args )>
This will translate to the following sub-request call:
--- /dev/null
+#!perl -T\r
+\r
+use Test::More tests => 3;\r
+\r
+BEGIN {\r
+ use_ok( 'Catalyst::View::Component::SubInclude' );\r
+ use_ok( 'Catalyst::View::Component::SubInclude::SubRequest' );\r
+ use_ok( 'Catalyst::View::Component::SubInclude::ESI' );\r
+}\r
+\r
+diag( "Testing Catalyst::View::Component::SubInclude $Catalyst::View::Component::SubInclude::VERSION, Perl $], $^X" );\r
--- /dev/null
+#!perl -T\r
+\r
+use Test::More;\r
+eval "use Test::Pod::Coverage 1.04";\r
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;\r
+all_pod_coverage_ok();\r
--- /dev/null
+#!perl -T\r
+\r
+use Test::More;\r
+eval "use Test::Pod 1.14";\r
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;\r
+all_pod_files_ok();\r