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%2FVisit.pm;h=034f058b10470c811b5025842bbfde9e1db79b16;hp=52ed67d153bde4298fcc76d24bf654d0df9bd3d1;hb=f91a7d21c753463d37f02cf9642ca80ddf0dadc7;hpb=7c937cccd1caf12c59b11f07ee76144f770b3ad8 diff --git a/lib/Catalyst/View/Component/SubInclude/Visit.pm b/lib/Catalyst/View/Component/SubInclude/Visit.pm index 52ed67d..034f058 100644 --- a/lib/Catalyst/View/Component/SubInclude/Visit.pm +++ b/lib/Catalyst/View/Component/SubInclude/Visit.pm @@ -3,7 +3,7 @@ use warnings; use strict; use Carp qw/croak/; -use namespace::clean qw/croak/; +use namespace::clean; =head1 NAME @@ -11,11 +11,11 @@ Catalyst::View::Component::SubInclude::Visit - visit() plugin for C::V::Componen =head1 VERSION -Version 0.05 +Version 0.07 =cut -our $VERSION = '0.05'; +our $VERSION = '0.07'; =head1 SYNOPSIS @@ -63,8 +63,6 @@ sub generate_subinclude { croak "subincludes through visit() require Catalyst version 5.71000 or newer" unless $c->can('visit'); - - $c->log->debug("generate subinclude: $path @params"); { local $c->{stash} = {}; @@ -74,7 +72,8 @@ sub generate_subinclude { local $c->response->{body}; - $c->visit( $path, ( ref $params[0] eq 'ARRAY' ? shift @params : () ) ); + my $captures = ref $params[0] eq 'ARRAY' ? shift @params : []; + $c->visit( $path, $captures, \@params ); return $c->response->{body}; }