Posted to tcl by Colin at Mon Jan 19 02:43:28 GMT 2009view raw

  1. namespace eval parent {
  2.  
  3. namespace eval child {
  4. proc clue {} {
  5. puts "got a clue"
  6. }
  7. namespace export -clear *
  8. }
  9.  
  10. namespace import child::*
  11. proc try {} {
  12. clue
  13. }
  14.  
  15. proc trythis {} {
  16. child::clue
  17. }
  18. }
  19.  
  20. parent::try
  21. parent::trythis
  22.  
  23.