X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FView%2FComponent%2FSubInclude%2FVisit.pm;fp=lib%2FCatalyst%2FView%2FComponent%2FSubInclude%2FVisit.pm;h=d5c5ec02771c7a689b496b0e23371b13a40a116a;hb=7094e990d51cd17a80ceb30cea0eca4c1295b395;hp=034f058b10470c811b5025842bbfde9e1db79b16;hpb=c2d8d5b5228548588977a1e49c20f494aba8bb20;p=catagits%2FCatalyst-View-Component-SubInclude.git diff --git a/lib/Catalyst/View/Component/SubInclude/Visit.pm b/lib/Catalyst/View/Component/SubInclude/Visit.pm index 034f058..d5c5ec0 100644 --- a/lib/Catalyst/View/Component/SubInclude/Visit.pm +++ b/lib/Catalyst/View/Component/SubInclude/Visit.pm @@ -59,13 +59,13 @@ with the other plugins. =cut sub generate_subinclude { - my ($class, $c, $path, @params) = @_; + my ($class, $config, $c, $path, @params) = @_; croak "subincludes through visit() require Catalyst version 5.71000 or newer" unless $c->can('visit'); { - local $c->{stash} = {}; + local $c->{stash} = $config->{keep_stash} ? $c->{stash} : {}; local $c->request->{parameters} = ref $params[-1] eq 'HASH' ? pop @params : {};