package Catalyst::View::Component::SubInclude::ESI;
-use warnings;
-use strict;
+use Moose;
+use namespace::clean -except => 'meta';
=head1 NAME
=head1 VERSION
-Version 0.03
+Version 0.07_03
=cut
-our $VERSION = '0.03';
+our $VERSION = '0.07_03';
+$VERSION = eval $VERSION;
=head1 SYNOPSIS
Varnish (L<http://varnish.projects.linpro.no/>) which allows cache-efficient
uses of includes.
-=head1 CLASS METHODS
+=head1 METHODS
=head2 C<generate_subinclude( $c, $path, @args )>
=cut
sub generate_subinclude {
- my ($class, $c, $path, @params) = @_;
+ my ($self, $c, $path, @params) = @_;
- my $args = ref $params[0] eq 'ARRAY' ? shift @params : [];
-
- my $dispatcher = $c->dispatcher;
- my ($action) = $dispatcher->_invoke_as_path( $c, $path, $args );
-
- my $uri = $c->uri_for( $action, $args, @params );
+ my $uri = $c->uri_for_action( $path, @params );
return '<!--esi <esi:include src="' . $uri->path_query . '" /> -->';
}
=cut
+__PACKAGE__->meta->make_immutable;
1;