[Templates] globals!

[prev] [thread] [next] [Date index for 2004/11/19]

From: Louai Abu-Osba
Subject: [Templates] globals!
Date: 19:22 on 19 Nov 2004
Hi,

I'm having trouble trying to use global variables.

I have a hash that lives in ant_hash.txt in my libs directory that says:

[% global = {ant_2TH = 0, etc..} %]

I have two identical templates in my src directory that say this:

[% PROCESS ant_hash.txt %]

[% global.ant_2TH = global.ant_2TH + 1 %]

global.ant_2TH = [% global.ant_2TH %]

When the two identical templates are processed they both say this:

global.ant_2TH = 1

My expectation is global.ant_2TH = 2 in the second template that gets 
processed. What am I doing wrong here? Thanks.

-louai

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] globals!
Louai Abu-Osba 19:22 on 19 Nov 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52