Am 03.06.2015 um 02:44 schrieb Paolo Bevilacqua: > Actually I'm having a lot of surprises, and I do indeed care about > variable persistence. What it means "to take place of the global > command" ? What is the "proc ::request::global" that "has been created" > ? I have tried global and doesn't work. Tried prepending :: to my > variable, doesn't work. Tried using ::request::global, as well ::global, > nothing works. > > In other words i want the behavior described as: That means that every > variable or procedure created in Tcl scripts resides by default in the > "::" namespace (just like in traditional Tcl scripting) and they are > persistent across different requests until explicitly unset or until the > interpreter is deleted. > > Note I do not need per-session persistence. I need a true global > variable. > > Thanks. > <i>Always striving to honor my word and commitments</i> > >
Dear Paolo, the "global" discussion is a side note and IMHO not the point you are facing. I am guessing. If you start Apache, it creates typically, at least, 4 processes with a tcl interpreter each. So if you do set "::myvar 1" in your rivet script once, you will find [info exists :myvar] true each 4th call or so. To resume, you don't have true globals by principle. If you want to share an information among all interpreters, you typically use a data base or a file or a socket connection, but global variables will not work. Hope this helps and you have fun with Rivet, Harald --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
