in reply to Re^2: Missing base classes when called from Tk
in thread Missing base classes when called from Tk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Perl OO bug? Debugger differs in method output than execution?
by perl-diddler (Chaplain) on Sep 27, 2007 at 21:25 UTC | |
None of my "("two or one, since timer is currently 'disabled'")" Tk event handler routines rely on searching @ISA. The handler is in the same "class" (package) as the "bind" statement that is 'binding' it to Tk. As for associating the method's invocation with the correct instance, I only allow 1 instance of an "open database" per program. So any methods called by Tk refer to the 1 program-wide instance (any wonder why global variables in the none OO were so useful?... but also, so constraining). The key handler makes an indirect call (or two). The entire code snipplet (which I plan on simplifying, later, once I get it "working" again -- I started from the linear, working 'proof-of-concept' code that was my first "version" of this program, but bound to '<Any_Keypress>', is this routine: Handle_key is what is making some of the "unfound" calls at this point -- the routines in the "jump table"...but it does not seem the jump table is at fault, since "q" (the quit action) properly calls the _quit function: sub _quit() { $_[0]->write_db(); exit 0; } and fails trying to call "write_db" on exit. "write_db" is a method in a parent class. Regardless of call syntax, Perl isn't searching my @ISA info for parent classes. If I am in the debugger before the "$s->write_db()" statement in "_quit()" and use the debugger's "m" command to print out available methods, it finds the parental method, but not when executed.
Perhaps this is a bug? I.e. shouldn't the debugger be using the same search method as that used during regular execution?
| [reply] [d/l] [select] |