X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FView%2FComponent%2FSubInclude%2FESI.pm;h=259f8cc6763dd2234ada2da5e7c74fa42f7587ac;hb=f97c716560e114d118695339a200fe5a7e09e9e5;hp=635d9789357ee247275a927dbcdb7374da762eae;hpb=532f3bcfb201047bdcce21de7a97a32f023248b5;p=catagits%2FCatalyst-View-Component-SubInclude.git diff --git a/lib/Catalyst/View/Component/SubInclude/ESI.pm b/lib/Catalyst/View/Component/SubInclude/ESI.pm index 635d978..259f8cc 100644 --- a/lib/Catalyst/View/Component/SubInclude/ESI.pm +++ b/lib/Catalyst/View/Component/SubInclude/ESI.pm @@ -1,6 +1,6 @@ package Catalyst::View::Component::SubInclude::ESI; -use warnings; -use strict; +use Moose; +use namespace::clean -except => 'meta'; =head1 NAME @@ -8,11 +8,11 @@ Catalyst::View::Component::SubInclude::ESI - Edge Side Includes (ESI) plugin for =head1 VERSION -Version 0.02 +Version 0.07 =cut -our $VERSION = '0.02'; +our $VERSION = '0.07'; =head1 SYNOPSIS @@ -55,14 +55,9 @@ common interface for plugins. =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 ''; } @@ -92,4 +87,5 @@ under the same terms as Perl itself. =cut +__PACKAGE__->meta->make_immutable; 1;