Re: [Mojolicious] Rendering templates question

2019-10-04 Thread Stefan Adams
Got it!  Your answer helped me to track down the code block I was looking
for: Mojo::Template::_wrap()
.

I was just curious how it works.  Thank you!

On Fri, Oct 4, 2019 at 2:10 PM Dan Book  wrote:

> Mojolicious::Plugin::EPRenderer passes the stash as args to
> Mojo::Template, which has the vars option enabled and thus creates
> variables based on the passed hash.
>
> -Dan
>
> On Fri, Oct 4, 2019 at 1:33 PM Stefan Adams  wrote:
>
>> In Mojolicious::Guides::Render#Embedded-Perl
>> ,
>> it says:
>>
>> At the beginning of the template, stash values that don't have invalid
>> characters in their name get automatically initialized as normal variables,
>> and the controller object as both $self and $c.
>>
>>
>> How are stash values initialized as normal variables?  That is, what code
>> is responsible for making this happen?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Mojolicious" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to mojolicious+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFSdKdJ15sPUTv19N3U7wc81O%3D7hv4i-kk%2BJ%3D_9Q%2BUd7Cw%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojolicious/CABMkAVWt%3DQhwzi-iDc7dQxxVf0whvWnG8_7bZpVEJC8om%3DSFCQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFTfjnSXNw9mqK3SDfU%3D2a5QMLJMs%2BnJgvLoSOXuCjAPxA%40mail.gmail.com.


Re: [Mojolicious] Rendering templates question

2019-10-04 Thread Dan Book
Mojolicious::Plugin::EPRenderer passes the stash as args to Mojo::Template,
which has the vars option enabled and thus creates variables based on the
passed hash.

-Dan

On Fri, Oct 4, 2019 at 1:33 PM Stefan Adams  wrote:

> In Mojolicious::Guides::Render#Embedded-Perl
> ,
> it says:
>
> At the beginning of the template, stash values that don't have invalid
> characters in their name get automatically initialized as normal variables,
> and the controller object as both $self and $c.
>
>
> How are stash values initialized as normal variables?  That is, what code
> is responsible for making this happen?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFSdKdJ15sPUTv19N3U7wc81O%3D7hv4i-kk%2BJ%3D_9Q%2BUd7Cw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CABMkAVWt%3DQhwzi-iDc7dQxxVf0whvWnG8_7bZpVEJC8om%3DSFCQ%40mail.gmail.com.


[Mojolicious] Rendering templates question

2019-10-04 Thread Stefan Adams
In Mojolicious::Guides::Render#Embedded-Perl
,
it says:

At the beginning of the template, stash values that don't have invalid
characters in their name get automatically initialized as normal variables,
and the controller object as both $self and $c.


How are stash values initialized as normal variables?  That is, what code
is responsible for making this happen?

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFSdKdJ15sPUTv19N3U7wc81O%3D7hv4i-kk%2BJ%3D_9Q%2BUd7Cw%40mail.gmail.com.