.
D 2002-12-10T04:37:56
J assignee dkf
J cmimetype text/plain
J comment The\snew\s"trace\sadd\scommand"\seither\shas\sa\sbug\sor\sisn't\nvery\suseful,\none\sor\sthe\sother.\s\sConsider\sthis\sexample:\n\nproc\sfoo\s{}\s{puts\s"Foo!"}\n\nproc\stracer\s{old\snew\sop}\s{\n\s\s\s\sputs\s"traced\s$old\s$new\s$op"\n\s}\n\ntrace\sadd\scommand\sfoo\srename\stracer\n\nnamespace\seval\smy_ns\s{\srename\sfoo\sbar\s}\n\nThis\soutputs\n\ntraced\sfoo\sbar\srename\n\nNow,\sin\sfact,\scommand\s::foo\sis\sbeing\srenamed\s::my_ns::bar.\nIf\sI'm\sreally\susing\sthis\strace\sfor\sanything\sbut\sdebugging,\nI\sneed\sto\sknow\sthat.\s\sSo\show\sdo\sI\sfind\sout?\s\sMy\sfirst\nthought\nwas\sthis,\susing\s"namespace\swhich":\n\nproc\stracer\s{old\snew\sop}\s{\n\s\s\s\sset\suold\s[uplevel\snamespace\swhich\s-command\s$old]\n\s\s\s\s\s\s\s\sset\sunew\s[uplevel\snamespace\swhich\s-command\s$new]\n\n\s\s\s\sputs\s"traced\s$old=$uold\s$new=$unew"\n}\n\nI\swas\shoping\sthat\srunning\sthe\ssame\scase\sas\sabove,\sI'd\sget\nthis\soutput:\n\ntraced\sfoo=::foo\sbar=::my_ns::bar\n\nInstead,\sI\sgot\n\ntrace\sfoo=::my_ns::bar\sbar=::my_ns::bar\n\nThis\sisn't\sentirely\sunreasonable;\sit\ssimply\smeans\sthat\nthat\sthe\scommand\shas\salready\sbeen\srenamed\swhen\s"tracer"\nis\scalled.\s\sIn\sa\sway,\sit's\ssurprising\sthat\sI\sget\sa\nresult\sfor\s"foo"\sat\sall.\n\nI\sfinally\sfound\sa\sworkaround...but\sgosh,\sI\sshouldn't\nhave\sto\sdo\sthat\s\nmuch\swork.\s\sThe\s"rename"\scommand\sobviously\shas\sto\nqualify\sthe\nproc\snames\sto\sdo\sits\sjob;\sit\sseems\scompletely\sunreasonable\nthat\sit\sdoesn't\spass\sthat\sinformation\salong\sto\sthe\ncallback.\n\nWill\sDuquette
J foundin obsolete:\s8.4.1
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 18.\sCommands\sM-Z
J title trace\sadd\scommand\sdoesn't\squalify\snames
J type Bug
K 651271ffffffffffffffffffffffffffffffffff
U nobody
Z 7ae42a5f94c4a2829c953c20a607a8a3