From: Keats <ke...@xa...> - 2004-02-26 15:33:18
|
I just looked at the code to refresh my memory. There are three variables supplied by the #eval directive: $OuterVars - a reference to the local variable map of the top level calling context. $Self - a reference to the templet itself (useful for recursive calls). $EvalDepth - current depth of recursion. I'll update the Wiki page accordingly. Keats ----- Original Message ----- From: "Keats" <ke...@xa...> To: <web...@li...> Sent: Thursday, February 26, 2004 9:26 AM Subject: Re: [WebMacro-user] Templets and scope? > It depends on how you execute it. By default the #eval directive creates a > new context. You can put things into the parent context using an automatic > variable. ($OuterVars I think. I'll have to check and update the docs.) > You can reuse the current context by just evaluating the templet as a > variable. > > Keats > ----- Original Message ----- > From: "Nikhil G. Daddikar" <ng...@ce...> > To: "webmacro" <web...@li...> > Sent: Thursday, February 26, 2004 8:39 AM > Subject: [WebMacro-user] Templets and scope? > > > > If I say #set $foo = "bar" in a templet, is the value of $foo accessible > > outside the templet? > > > > Thanks. > |