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

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?