According to the docs for "our":
So maybe you want:Multiple "our" declarations in the same lexical scope are allowed if they are in different packages. If they happened to be in the same package, Perl will emit warnings if you have asked for them. use warnings; package Foo; our $bar; # declares $Foo::bar for rest of lexical scope $bar = 20; package Bar; our $bar = 30; # declares $Bar::bar for rest of lexical scope print $bar; # prints 30 our $bar; # emits warning
Update: Then again, if the four packages are in the same file, maybe you only want "our @ISA" once (in package TWO) -- try leaving out the "our @ISA" in the later packages, and just push onto it.package File_Rating_DB; #pckg ONE sub write_db(){}... package Entry_Ordering; #pckg TWO our @ISA = qw(File_Rating_DB); sub next_rand_or_recorded_file() {}... package Entry_Display_In_Wins; #pckg THREE our @ISA; push @ISA, qw(Entry_Ordering); sub __hk_space(){ call next_rand_or_recorded_file}... sub __hk_quit(){ ...calls write_db on exit } sub handle_key($tkcontext,$dbhandle,$key_event, $key_code) {} package Timed_Display_In_Wins; #pckg FOUR our @ISA; push @ISA, qw(Entry_Display_In_Wins); sub _handle_timer(){}
(As I said, I'm just guessing, but it seems worth a try, maybe?)
BTW, regarding my earlier reply, I do know what you mean when you say the old code "wasn't in a form I wanted to enhance it in." I've had that same feeling about some of the stuff I've written, and somehow it usually seems to involve Tk scripts... Good luck!
In reply to Re: Missing base classes when called from Tk
by graff
in thread Missing base classes when called from Tk
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |