This is not necessarily the current version of this TIP.
|Title:||Add a -namespace Option to [interp invokehidden]|
|Version:||$Revision: 1.4 $|
Joe Mistachkin <joe at mistachkin dot com>|
Don Porter <dgp at users dot sf dot net>
|Created:||Tuesday, 29 June 2004|
This TIP proposes a -namespace option for the interp invokehidden subcommand to allow hidden commands to be invoked in the specified namespace context in the slave interpreter.
Safe interpreters and namespaces have been useful and important features of Tcl since version 8.0. However, it can sometimes be difficult to use them together effectively. For example, while you can invoke a hidden command in a safe interpreter with interp invokehidden, such as source, you cannot specify the target namespace context where the command should be invoked. Using the interp eval subcommand is not an option because that, by design, does not allow hidden commands to be invoked. In addition, since the interp invokehidden subcommand expects a command name, namespace eval and similar constructs that would typically be used to change the target namespace context cannot be used.
interp invokehidden path ?-namespace namespace? ?-global? ?--? hiddenCmdName ?arg ...?
The interp invokehidden subcommand would continue to function as the current documentation dictates with the following notable exceptions:
The -namespace specifies the target namespace context in the slave interpreter where the command should be invoked.
The target namespace context specified by the -namespace option is created in the slave interpreter if it does not already exist.
If both the -global and -namespace options are present, the -namespace option is ignored.
A -- option (with the standar