Forum OpenACS Development: Re: Can we use namespace variables to avoid upvar?

Collapse
Posted by Jon Griffin on
Dave,
That is not true, I had a long exchange with the AOLServer team about this and the consensus was that they don't really see a need to initialize reused threads.
SO yes the problem is still there. This only affects vars not namespaces in general.
Still a big minus in that we could get rid of passing vars explicitly if it was working correctly. And, yes tcllib will not work correctly either.
Collapse
Posted by Tilmann Singer on
Indeed, the following script yields 'variable exists' after a few reloads on aolserver 4:

set s ""
if { [info exists ::mytest::some_var] } {
    set s "VARIABLE EXISTS!"
}
namespace eval ::mytest {
    variable some_var
    set some_var "foo"
}
append s "some_var: $::mytest::some_var"
doc_return 200 text/plain $s

Jon, was that long exchange you mention on the aolserver list?