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}.

转载于:https://www.cnblogs.com/greencolor/archive/2011/06/16/2082575.html

你可能感兴趣的:(namespace code)