Overview
| Artifact ID: | abfbb4dee374689d4faf524d48fd4eea379e570d |
|---|---|
| Ticket: | 1590790fffffffffffffffffffffffffffffffff
new [info call] command |
| User & Date: | msofer on 2006-11-05 12:32:54 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
The idiom [uplevel 1 [info level 0]] fails to call the currently executing proc in some corner cases [Bug 1590483]. Note that this can be fixed by letteing [interp alias] use fully qualified names. Should TIP 283 pass, the idiom breakage will be more widespread: it will not work at all for procs implementing ensemble subcommands, except in the rarest of occasions: the ensemble command is called from within the ensemble's namespace, or from a namespace that has the ensemble's in its resolution path (and is not shadowed). The attached patch provides a new [info call] subcommand that functions like [info level]. The difference between the two is that, when a command is rewritten prior to invocation (by an alias or ensemble), [info level n] returns the fully rewritten command (as invoked in the core), whereas [info call n] returns the original command as present in the source, after substitutions but before rewrites (as called by the user). This is useful for two reasons: - to provide a way to call the currently executing proc again, using [uplevel 1 [info call 0]] - to provide a way for procs to produce meaningful error reports that refer to what the user wrote
- foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "msofer"
- subsystem changed to: "17. Commands I-L"
- title changed to: "new [info call] command"
- type changed to: "RFE"