.
D 2005-06-30T21:05:29
J assignee msofer
J cmimetype text/plain
J comment \nConsider\sthe\sTcl\sscript:\n\nnamespace\seval\s::foo\s{\n\s\s\s\sproc\sfoo\s{}\s{}\n\s\s\s\snamespace\sexport\sfoo\n}\nnamespace\seval\s::bar\s{\n\s\s\s\snamespace\simport\s::foo::foo\n}\n\nThis\sscript\scan\sonly\sbe\seval'd\none\stime.\s\s(If\sit's\sin\sa\sfile,\sthat\nfile\scan\sonly\sbe\s[source]d\sone\ntime).\n\nThe\ssecond\sattempt\swill\nthrow\san\serror\sfrom\sthe\n[namespace\simport]\sattempt.\nThe\serror\sis\smeant\sto\swarn\sus\nthat\sthe\s[namespace\simport]\nis\soverwriting\san\sexisting\scommand.\n\nIn\sexamples\slike\sthis\sone,\sthough,\nthat\swarning\sis\swrong-headed.\nWe're\s"overwriting"\san\simport\swith\nitself,\ssomething\sperfectly\ssafe.\n\nWorse,\sthe\simport\simplementation\scode\nhas\sall\sthe\sinfo\sit\sneeds\sto\scheck\sand\nverify\sthat\sthis\sis\sperfectly\ssafe,\syet\sfails\nto\sdo\sso.\n\nMuch,\smuch\sworse,\sthe\sexisting\s"fix"\nfor\sthis\sproblem\sis\sto\sadd\s"-force"\sto\nthe\s[namespace\simport]\swhich\sloses\nall\ssafety,\seven\sthat\swhich\swould\sbe\nuseful.\n\nHere's\sa\spatch\sto\smake\s[namespace\simport]\nstop\sraising\serrors\son\s"overwrites"\sof\san\nimport\sover\sitself.\s\sThis\sis\sobviously\sa\sgood\nidea.\s\sLess\sobvious\swhether\sa\sTIP\sis\srequired.\n\nThis\spatch\sis\sall\sthat's\sneeded\sto\sfix\nTk\sBug\s1230576.
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 21.\s[namespace]
J title allow\s[namespace\simport]\sof\ssame\scommand
J type RFE
K 1230597fffffffffffffffffffffffffffffffff
U dgp
Z ffe89930f12abb0fb6ab1d82dc615f69