Am 08.07.13 15:21, schrieb David Osborne: > That certainly does the trick. Thanks. > > What's your opinion. Could this be considered a bug in Tcl? > Would seem a lot cleaner if ::clock::Initialize just ran > ::tcl::clock::ClearCaches before initialising the TZData array which > would allow ::tcl::clock::Initalize to run multiple times. The problem is not only the caches (otherwise it would have been sufficient to exclude the ::tcl::* namespaces from the blueprint), but also the definition of proc "clock", which redefines itself in terms of an ensemble. This makes it sensitive to the definition order.
Btw, my impression is that when ":localtime" is used instead of ":Tcl/Localtime" .... proc clock_test {} { ns_log Notice [clock format [clock scan now] -format "%Y-%m-%d %H:%M:%S" -timezone :localtime] return true } ... then everything is fine even when we do not exclude "proc clock" from the blueprint. Can you check this? Why are you using ":Tcl/Localtime" at the first place? Is this usage documented? > I notice the same test case doesn't raise an error in Aolserver. Seems > after a ns_eval the ::tcl::clock:: vars left not populated so > ::tcl::clock::Initialize runs cleanly. Couldn't ascertain from my > limited understanding of the internals why it should be different. aolserver does essentially the same thing as naviserver. my guess is that this is sheer luck in the order of definitions. Furthermore, a single call to lock "at the right time" can heal everything or lead to the error, since clock is kind of a "self modifying" code... I still think, that leaving out the tcl namespaces "::tcl::* is the way to go; but i would prefer, if we don't have to muck around with ::clock. -gustaf neumann ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel