X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FView%2FComponent%2FSubInclude%2FESI.pm;h=85acbdd620cb8f21f13720c22b415cbc53d84868;hb=bff1b853c17ad52e468fe8984ab3b18964463c7f;hp=6b258fb1b83efc8732f427afe94d983bb2e282ac;hpb=9399de67c73e690611087f7aa359537a7bef4b46;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 6b258fb..85acbdd 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,12 @@ Catalyst::View::Component::SubInclude::ESI - Edge Side Includes (ESI) plugin for =head1 VERSION -Version 0.07 +Version 0.07_03 =cut -our $VERSION = '0.07'; +our $VERSION = '0.07_03'; +$VERSION = eval $VERSION; =head1 SYNOPSIS @@ -55,14 +56,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 +88,5 @@ under the same terms as Perl itself. =cut +__PACKAGE__->meta->make_immutable; 1;