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

Posted by Tilmann Singer on
The problem is that in the package initalization code the variables can potentially get set to default values, such as in under "Rule 9". This would only happen on the _first_ call of package require, not on subsequent ones when the thread has already loaded the package. There seems to be no way for a general mechanism in aolserver or openacs to find out _how_ these variables should get reset.

Apparently the only solution is to be careful when using libraries with aolserver that contain state information and manually clean up by calling custom reset procs if provided by the package or resetting variables manually (ugly) before using a tcl package in a new connection.