I've been thinking recently to add some introspection in Rivet coding a ::rivet::info command similar to PHP's phpinfo(). A natural way to use this command could be reading values of configuration parameters and other stuff. For example ::rivet::info should return the value of configuration parameters that now are stored in 3 undocumented arrays RivetServerConf, RivetDirConf and RivetUserConf.
My idea is to store internally the configuration parameters in a dictionary and let ::rivet::info be an interface to this dictionary ::rivet::info ?<parameter_class>? ?<parameter_name>? examples puts [::rivet::info server child_init] <== <ChildInitScript value> in case SeparateVirtualInterps is off puts [::rivet::info server separate_virtual_interps] <== 0 puts [::rivet::info dir] <== <dictionary of per-dir configuration params> puts [::rivet::info] <== <whole configuration parameters dictionary> current way of storing these parameters could be emulated by adding lines to Rivet's conf file such as array set RivetServerConf [::rivet::info server] to store in an array the per server parameter values, in a BeforeScript directive this command array set RivetDirConf [::rivet::info dir] would get per dir parameter values into an array. a dictionary would be OK because has better flexibility by organizing parameters in different classes (first argument to the command) and it could be extended easily to other parameters classes and values introspection through the ::rivet::info command will be safer and it should save the developer from doing trivial errors such as resetting or changing variables in the global arrays where parameters are now (I think basically they had been stored there only for debugging purposes) -- Massimo --------------------------------------------------------------------- To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org For additional commands, e-mail: rivet-dev-h...@tcl.apache.org