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;fp=lib%2FCatalyst%2FView%2FComponent%2FSubInclude%2FVisit.pm;h=88e883c2fd9a0e8345eb1b3dd8d09cc1f5a302d5;hp=314449974ac980911e91234e96a9537645bfeb5c;hb=4162256ab5c7c2446154a05e8c5dfdf1bd9a9a53;hpb=275ab645ed6531f108d7184c394498ee62aea68d diff --git a/lib/Catalyst/View/Component/SubInclude/Visit.pm b/lib/Catalyst/View/Component/SubInclude/Visit.pm index 3144499..88e883c 100644 --- a/lib/Catalyst/View/Component/SubInclude/Visit.pm +++ b/lib/Catalyst/View/Component/SubInclude/Visit.pm @@ -52,6 +52,25 @@ But it will handle all the nasty details such as localizing the stash, parameters and response body. This is necessary to keep behavior consistent with the other plugins. +=head1 CONFIGURATION + +=head2 keep_stash + +You can choose to not localize the stash for Visits' subinclude calls. The subrequest +will have the same stash as the request that spawned it. Configure the keep_stash key +in your view: + + __PACKAGE__->config( + subinclude => { + 'Visit' => { + keep_stash => 1, + }, + } + ); + +Note: changes in the stash during a Visit subinclude will be visible after the include +returns. + =cut has keep_stash => (