Overview
| Artifact ID: | 70e1f243964524f1dd9d2edeea19561a2b0b6932 |
|---|---|
| Ticket: | 559268ffffffffffffffffffffffffffffffffff
incorrect [namespace forget] docs |
| User & Date: | msofer on 2002-05-23 03:33:12 |
Changes
- icomment:
Logged In: YES user_id=148712 Indeed, the docs are misleading. It almost seems that the usage of unqualified names is the only safe way to [namespace forget] an imported command, as shown in the following: % namespace eval tst0 {proc a {} {puts hello}} % namespace eval tst0 {namespace export a} % namespace eval tst1 {namespace import ::tst0::a} % tst1::a hello % namespace eval tst0 {rename a b} % namespace eval tst1 {rename a c} % tst1::c hello % # cannot forget using the original import name % namespace eval tst1 {namespace forget ::tst0::a} % tst1::c hello % # cannot forget using the current name of the imported proc % namespace eval tst1 {namespace forget ::tst0::b} % tst1::c hello % # cannot forget using the current local name and the exporter's path % namespace eval tst1 {namespace forget ::tst0::c} % tst1::c hello % # forget only using the current local name % namespace eval tst1 {namespace forget c} % tst1::c invalid command name "tst1::c" - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"