Yeah...I think I understand that...but shouldn't "jump tables" defined within a package that access (use) ancestor functions use @ISA?

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:

sub __handle_key { my ( $s, $key_event, $key_code) = @_[1..3]; my $image_win = $s->image_win; # use Readonly; Readonly my $single_key_commands => "\003\015\033 +-0123456789 +RWbnpq"; Readonly my @single_key_functions => ( \&_abort, \&next_rand_or_recorded_entry, \&_abort, \&_space, \&inc_cur_rating, \&dec_cur_rating, \&_set_rating, \&_set_rating, \&_set_rating, \&_set_rating, \&_set_rating, \&_set_rating, \&_set_rating, \&_set_rating, \&_set_rating, \&_set_rating, \&_reset_to_beginning_entry, \&write_db, \&backup_entry, \&next_rand_or_recorded_entry, + \&_pause, \&_quit ); Readonly my @key_code_commands => qw( Left Up Right Down Home +KP_Home); Readonly my @key_code_functions => ( \&backup_entry,\&backup_entry, \&next_rand_or_recorded_entry, \&next_rand_or_ +recorded_entry, \&_set_to_beginning_entry, \&_set_to_beginning_entry, ); KEY_SWITCH: { if ($key_event ne '') { my $active_key=index $single_key_commands, $key_event; if ($active_key >= 0 ) { $single_key_functions[$active_key] -> ($s, $key_event, $key_ +code); last KEY_SWITCH; } } else { # ($key_event eq '') # ignore modkeys return if ($key_code =~ /^(?:Shift|Control|Alt)_[RL]$/ + || $key_code =~ /^(:Shift|Num|Scroll)_Lock$/); ($key_code eq '') && do { # null event carp("key handler called with no key data\n"); error_beep(); return; }; my $active_key_code=_str_index @key_code_commands, $ke +y_code; if ($active_key_code >= 0) { $key_code_functions[$active_key_code] -> ($s, $key_event, $key_ +code); last KEY_SWITCH; } } { # default (unhandled/unexpected key) printf "Unrecognized key \'%s\', code \'%s\'\n", $key_ +event, $key_code; error_beep(); return; }; } # end KEY_SWITCH; if ($s->disable_auto_advance()) { alarm 0; $s->timer_enabled(0); } else { $s->timer_ticked(0); alarm $s->auto_advance_time; $s->timer_enabled(1); } $s->show_cur_entry_in_imgwin(); }
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?
L


In reply to Perl OO bug? Debugger differs in method output than execution? by perl-diddler
in thread Missing base classes when called from Tk by perl-diddler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.