TCL equivalent of PHP "phpinfo()"?

From: Phil Powell (soazine_at_erols.com)
Date: 12/31/03


Date: 31 Dec 2003 09:56:23 -0800

I am seeking code that will dump all global vars out to screen or
standard out. I tried writing it on my own, to no avail (no big
surprise, huh?). This is what I have so far:

foreach var [info globals] {
 if {[array exists $var]} {foreach blah [array names $var] {puts
"$var\($blah\) = {{I have no idea what to put here}"}}
 if {[info exists $var] && ![array exists $var]} {puts "$var: [set
$var]"}
}

I am seeking the equivalent of PHP's "phpinfo()" command that dumps
every global variable out all nice and formatted for you. Is there
anything out there that does that or what must I do to my existing
code to be able to view all global vars (arrays and all)?

Thanx
Phil