Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a9b2bd9354c386694977b4662fb54662f7002f0e
Ticket: 900cb0284bcf1bf27038a7ae02c9f1440b150c86
TclOO unexport introspection bug
User & Date: Napier on 2017-03-25 20:37:15
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    So just ran into what I believe is a bug with TclOO.  I understand why it occurs and why the lifecycle specifics are probably getting in the way, but it definitely appears to be a bug.  In this case one that is rather severe since there is no way to introspect mixin relationships with unexport involved.
    
    In my case the mixin is unexporting some methods that may or may not exist.  During the definition we have no real way of knowing whether or not the methods will at some point exist.  The problem comes in later when we want to know if the method exists (without calling the method first and defining it on the mixin).  
    
    While its possible to create a method that will check [self next] that does not appear to be an appropriate solution for multiple reasons.  
    
    Additionally, in this case the error it reports when the problem occurs is:
    
    "unknown method "method_two": must be <cloned>, check, check_class, destroy, eval, method_one, method_two, unknown, variable or varname"
    
    See the paste below for an example of the bug that will allow you to re-create it.
    
    http://paste.tclers.tk/4186
    
  5. foundin changed to: "8.6.6"
  6. is_private changed to: "0"
  7. login: "Napier"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "d40c07534aa06a9bd120e0feb224d87bc7d21bae"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "Napier"
  14. subsystem changed to: "35. TclOO Package"
  15. title changed to: "TclOO unexport introspection bug"
  16. type changed to: "Bug"