<i>[namespace forget] matches by name only</i> status still Open with 4 other changes
by
.
D 2004-08-31T23:18:22
J icomment Logged\sIn:\sYES\s\nuser_id=80530\n\n\nthe\sfailing\stest\sraises\sthe\squestion\nof\show\sto\sforget\simport\schains.\n\n%\snamespace\seval\sorigin\s{\s\s\n\s\s\s\snamespace\sexport\scmd\n\s\s\s\sproc\scmd\sargs\s{}\n}\n%\snamespace\seval\slink\s{\n\s\s\s\snamespace\sexport\scmd\n\s\s\s\snamespace\simport\sorigin::cmd\n}\n%\snamespace\seval\sunrelated\s{\n\s\s\s\snamespace\sexport\scmd\n\s\s\s\sproc\scmd\sargs\s{}\n}\n%\snamespace\seval\smy\snamespace\simport\s::link::cmd\n\nAt\sthis\spoint,\sin\san\sunpatched\sTcl,\sany\sof\nthe\sfollowing\scommands\sin\snamespace\s"my"\nwill\sforget\smy::cmd\s:\n\nnamespace\sforget\s::origin::cmd\nnamespace\sforget\s::link:::cmd\nnamespace\sforget\s::unrelated::cmd\n\nThe\slast\sis\scase\s(1)\sin\sthe\sbug\sreport.\n\nAfter\sthe\sattached\spatch\sis\sapplied,\nonly\n\nnamespace\sforget\s::origin::cmd\n\nwill\swork.\n\nThe\stest\sfails\sbecause\sit\swould\nexpect\sthat\n\nnamespace\sforget\s::link::cmd\s\n\nwould\salso\swork,\sand\sthat\shas\nsome\sintuitive\sappeal\sas\swell,\nas\sthat\sis\sreally\sthe\scommand\nthat\swas\simported.\n\nSo\swe\shave\ssome\soptions\nhow\sto\sdeal\swith\sthe\slinks\sin\nan\simport\schain:\n\n1)\sforget\sbased\sonly\son\sthe\sorigin.\n\s\s-\swhat\sthe\spatch\sdoes\n2)\sforget\sbased\sonly\son\sthe\sfirst\slink\n\s\s-\scloser\sin\sintuition\sto\sbeing\sthe\n\s\s\s\sinverse\sof\sa\s[namespace\simport]\n3)\sBoth\s1)\sand\s2)\n\s\s-\sallow\sforgetting\sby\seither\s1st\sor\slast\n4)\sforget\sbased\son\sany\slink\sin\sthe\schain\sat\sall\n\nAdvantage\sof\s1)\sis\sthat\sit\smeans\n\s\s\s\s[namespace\sforget\s[namespace\sorigin\s$cmd]]\nis\salways\sa\sreliable\soperation.\nAdvantage\sof\sincluding\s2)\sas\swell\sis\sthat\nthere\swill\sbe\sno\sfailing\stests,\sand\sit's\nmore\sintuitive\nSo,\sI\sthink\sI\slike\s3)\n\nShould\sprobably\sbe\ssaid\sthat\sthis\swhole\nrealm\sis\slikely\sbest\savoided\sby\susing\n[namespace\sforget\s$simpleName]\nwhenever\spossible.\n\n
J login dgp
J mimetype text/plain
J username dgp
K 560297ffffffffffffffffffffffffffffffffff
U dgp
Z 5a6d5ac4cf47a35f939a81ddba10aecc