Posted to tcl by hypnotoad at Fri Apr 05 17:28:07 GMT 2019view raw

  1. oo::class create Bar {}
  2.  
  3. oo::objdefine Bar method new_value name {
  4. # Build your template as the variable $body
  5.  
  6. oo::objdefine [self] method $name args $body
  7.  
  8. }