You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<masak> p: my %h; macro attr($key, $val) { quasi { %h{ {{{$key}}} } =
{{{$val}}} } }; attr("x", "OH HAI"); say %h<x>
<camelia> ..rakudo-parrot e32249: OUTPUT«(Any)»
<masak> huh!
<masak> anyway, I think I know what's going on.
<masak> the assignment happens to a %h in the static lexpad.
<masak> not sure how to get at that %h to show it, though.
<masak> oh, hold on.
<masak> p: my %h; macro attr($key, $val) { quasi { %h{ {{{$key}}} } =
{{{$val}}} } }; macro diag { quasi { say %h<x> } }; attr("x", "OH
HAI"); diag;
<camelia> ..rakudo-parrot e32249: OUTPUT«OH HAI»
<masak> there we go.
<masak> to be perfectly honest, I'm not even 100% sure this behavior is *wrong*.
<masak> (because the runtime %h doesn't exist by the point the macro is invoked)
<masak> it's closure semantics, basically.
* masak submits rakudobug about %h being the static one, Justin Case
Migrated from rt.perl.org#120928 (status was 'stalled')
Searchable as RT120928$
The text was updated successfully, but these errors were encountered: