On Thu, 23 May 2002, Gernot Homma wrote:

> Hi, 
> 
> is there possibility to make variables global in TT2 through include
> directives.

You could always use PROCESS

> The problem is that i could not use "PROCESS" because I'm also passing
> variables to the block that should be local.

Oh.

Er, Do this:

Foo.templ
---------
[% wobble.fish = "Dummy Var" %]
[% INCLUDE Bar.templ %]
Wibble is [% wobble.wibble %]

Bar.templ
---------
[% wobble.wibble = "Hello Nurse!" %]


Thus taking advantage of the stash cloning and restoration being only skin 
deep.

Actually, you probably shouldn't do this, and write a plugin that stores
variables between calls for you, but hey, it works.

-- 
s''  Mark Fowler                                     London.pm   Bath.pm
     http://www.twoshortplanks.com/              [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}



Reply via email to