In acs-content-repository/tcl/filter-procs.tcl there are several procedures that create a namespace variable, and then other procedures in that namespace share the value of that variable. It doesn't have to be passed around or upvar'ed.
It is possible to export a namespace variable and import it into another procedure. I am not the expert on tcl namespaces, but it seems like it would be a good idea to investigate using namespace variables more in the toolkit. It is much clearer what is happening, and it is much more standard Tcl style.
ACS/OpenACS started on Tcl 7 which did not support namespaces. Now that we require a version of AOLserver that used Tcl 8.x it could help clean up the code to use namespaces more.
Request notifications