#$Id: Script.xotcl,v 1.1 2004/05/23 22:50:39 neumann Exp $ package provide xotcl::script 0.9 @ @File {description { A small package to instantiate an object, that represents a script. } } @ Class Script { description { An object of type Script becomes automatically the command line arguments evaluated as "-" method calls during creation, e.g. <@pre> Script s -set r 5 and a call with cmd-line "-set v 6" of the script, results in an object s with two vars set: r to 5, and v to 6. } } Class Script Script proc create args { eval lappend args $::argv eval next $args } Script instproc unknown args { puts stderr "$::argv0: Unknown option ´-$args´ provided" }