Object Oriented Moore Type State Machines in Tcl
With the release of Tcl 8.6, an object system has been built into the core. The new object system provides provides fundamental capabilities to build sophisticated object oriented programming environments and also serves as small object system in itself.
The oomoore package uses the TclOO commands available in Tcl 8.6 to define a meta-class that can be used to specify state behavior for Tcl objects. The link references a package file that may be installed directly into your teacup.
The background in state machines described for the moore package package applies to oomoore, so we won't repeat it here.