Home
The Toolkit for Online Communities
17508 Community Members, 0 members online, 2240 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : Can we use namespace variables to avoid upvar? : One Message

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?