'''info body''' ''procname'' Returns the body of procedure ''procname''. ''Procname'' must be the name of a [Tcl procedure]. Note that if the proc has been imported from another namespace, then it is the body of that proc that is returned. This can lead to considerable confusion in relation with variable names, allowing a situation where a proc defined with the body returned from info body P will not behave in the same way as P itself! Consider this example: namespace eval x { variable q 123 proc ww {} { variable q return $q } namespace export ww } namespace eval i { variable q 456 namespace import -force ::x::ww } Now let us test the proc i::ww and see if we can understand it: % i::ww 123 % info body i::ww variable q return $q % set i::q 456 Quite mysterious, if we didn't know that i::ww was defined by [namespace import]. I don't know if this behaviour should be considered a bug, you just have to be careful, and always do [namespace origin] before doing [info body]... ---- See also: * [info] ---- [Category Command] - [Tcl syntax help]