namespace code

suppose the command set script [namespace code {foo bar}] is invoked in namespace ::a::b. Then eval "$script x y" can be executed in any namespace (assuming the value of script has been passed in properly) and will have the same effect as the command ::namespace eval ::a::b {foo bar x y}.

posted @ 2011-06-16 12:40  greencolor  阅读(164)  评论(0编辑  收藏  举报