Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rename(1t) [opensolaris man page]

rename(1T)						       Tcl Built-In Commands							rename(1T)

__________________________________________________________________________________________________________________________________________________

NAME
rename - Rename or delete a command SYNOPSIS
rename oldName newName _________________________________________________________________ DESCRIPTION
Rename the command that used to be called oldName so that it is now called newName. If newName is an empty string then oldName is deleted. oldName and newName may include namespace qualifiers (names of containing namespaces). If a command is renamed into a different namespace, future invocations of it will execute in the new namespace. The rename command returns an empty string as result. EXAMPLE
The rename command can be used to wrap the standard Tcl commands with your own monitoring machinery. For example, you might wish to count how often the source command is called: rename ::source ::theRealSource set sourceCount 0 proc ::source args { global sourceCount puts "called source for the [incr sourceCount]'th time" uplevel 1 ::theRealSource $args } SEE ALSO
namespace(1T), proc(1T) KEYWORDS
command, delete, namespace, rename ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTcl | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tcl is available on http://opensolaris.org. Tcl rename(1T)

Check Out this Related Man Page

delete(n)							    [incr Tcl]								 delete(n)

__________________________________________________________________________________________________________________________________________________

NAME
delete - delete things in the interpreter SYNOPSIS
itcl::delete option ?arg arg ...? _________________________________________________________________ DESCRIPTION
The delete command is used to delete things in the interpreter. It is implemented as an ensemble, so extensions can add their own options and extend the behavior of this command. By default, the delete command handles the destruction of namespaces. The option argument determines what action is carried out by the command. The legal options (which may be abbreviated) are: delete class name ?name...? Deletes one or more [incr Tcl] classes called name. This deletes all objects in the class, and all derived classes as well. If an error is encountered while destructing an object, it will prevent the destruction of the class and any remaining objects. To destroy the entire class without regard for errors, use the "delete namespace" command. delete object name ?name...? Deletes one or more [incr Tcl] objects called name. An object is deleted by invoking all destructors in its class hierarchy, in order from most- to least-specific. If all destructors are successful, data associated with the object is deleted and the name is removed as a command from the interpreter. If the access command for an object resides in another namespace, then its qualified name can be used: itcl::delete object foo::bar::x If an error is encountered while destructing an object, the delete command is aborted and the object remains alive. To destroy an object without regard for errors, use the "rename" command to destroy the object access command. delete namespace name ?name...? Deletes one or more namespaces called name. This deletes all commands and variables in the namespace, and deletes all child names- paces as well. When a namespace is deleted, it is automatically removed from the import lists of all other namespaces. KEYWORDS
namespace, proc, variable, ensemble itcl 3.0 delete(n)
Man Page