-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make template keyword global (GH #1159): #1163
Conversation
This makes sure the `template` keyword is available outside the request process. The request object (including the parameters and variables) will not be available during that `template` call.
Sessions are lazy, however we instantiate them before rendering a template within a request. When using `template` as a global keyword, we need to check that a request exists *AND* a sesison exists (for the request).
f24c486
to
3ad59bb
Compare
Added test case and predicate checks for a request before calling ( Session objects are lazy; when a request exists we inflate the session object before rendering a template if the route code didn't require the session be instantiated. ) |
@girlwithglasses what do you think? |
Looks great to me -- thank you! |
Should we merge this too? |
Would be nice to get one more thumbup. Pinging @racke, @SysPete or @cromedome for review |
👍 looks good to me. Change is small and there are people out there who want this. |
Thanks everyone. Merged as 5d3cdca. 👯 |
[ BUG FIXES ] * GH #1165, #1167: Copy is_behind_proxy attribute into new request on forward. (Russell Jenkins) [ ENHANCEMENTS ] * GH #1120: Move from MooX::Types::MooseLike to Type::Tiny for performance. (Peter Mottram) * GH #1145, #1164: Replace Class::Load with Module::Runtime (Sawyer X) * GH #1159, #1163: Make template keyword global. (Sawyer X, Russell Jenkins) [ DOCUMENTATION ] * GH #1158: List both static and shared modules in Apache's deploy instructions. (Varadinsky)
This makes sure the
template
keyword is available outside the request process. The request object (including the parameters and variables) will not be available during thattemplate
call.