From: nilson Date: Thu, 5 Feb 2009 21:45:42 +0000 (+0000) Subject: Fix ESI plugin, update Makefile.PL X-Git-Tag: 0.03~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-View-Component-SubInclude.git;a=commitdiff_plain;h=065d5656094bc9b4a8cf3a3466dac7df610d2ecf Fix ESI plugin, update Makefile.PL --- diff --git a/Makefile.PL b/Makefile.PL index 55d5179..30d6739 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,7 +5,7 @@ use inc::Module::Install; name 'Catalyst-View-Component-SubInclude'; all_from 'lib/Catalyst/View/Component/SubInclude.pm'; -requires 'Catalyst::Runtime' => '5.7014'; +requires 'Catalyst::Runtime' => '5.70000'; requires 'Catalyst::Plugin::SubRequest'; requires 'Moose'; requires 'Moose::Role'; diff --git a/lib/Catalyst/View/Component/SubInclude/ESI.pm b/lib/Catalyst/View/Component/SubInclude/ESI.pm index 1c98d62..6d763e1 100644 --- a/lib/Catalyst/View/Component/SubInclude/ESI.pm +++ b/lib/Catalyst/View/Component/SubInclude/ESI.pm @@ -53,10 +53,14 @@ common interface for plugins. =cut sub generate_subinclude { - my $class = shift; - my $c = shift; - my $url = $c->uri_for( @_ ); - return ''; + my ($class, $c, $path, @params) = @_; + + my $dispatcher = $c->dispatcher; + my ($action, $args) = $dispatcher->_invoke_as_path( $c, $path, @params ); + + my $uri = $c->uri_for( $action, $args ); + + return ''; } =head1 SEE ALSO