X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-View-Component-SubInclude.git;a=blobdiff_plain;f=lib%2FCatalyst%2FView%2FComponent%2FSubInclude%2FESI.pm;h=ba095e996c6d4f8fc07f01ce8f04b4e0739d6ea4;hp=7dfc7b3770a1c4af34676401d9b43117f68e9cd3;hb=HEAD;hpb=be2a019af2b1ffb2672e77b65e3644ee6ee278cd diff --git a/lib/Catalyst/View/Component/SubInclude/ESI.pm b/lib/Catalyst/View/Component/SubInclude/ESI.pm index 7dfc7b3..ba095e9 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.03 +Version 0.07_03 =cut -our $VERSION = '0.03'; +our $VERSION = '0.07_03'; +$VERSION = eval $VERSION; =head1 SYNOPSIS @@ -37,7 +38,7 @@ Edge Side Includes (ESI) include directives. This is a feature implemented by Varnish (L) which allows cache-efficient uses of includes. -=head1 CLASS METHODS +=head1 METHODS =head2 C @@ -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;