in reply to Revolving door blessing.

++chromatic , ++robartes
Aha - I think I get it. Having not used inheritance yet I failed to recognise the case for using it. So if I have this right.....
package oo::job; @ISA = qw/ oo::gui::defaultjob/; use strict; sub new { }; # Make my hash and bless into oo::job 1; package oo::gui::defaultjob; @ISA= qr/ Tk /; sub build_gui { }; #packing widgets into a toplevel object sub display{} ; #invoke MainLoop on toplevel 1; package main; use oo::job; my $job = oo::job->new( %options ); $job->build_gui(); $job->display;

Now if that is even close , then my program just got about 1000 times easier to build.

submersible_toaster shuffles off to the library for further wisdom

Replies are listed 'Best First'.
Re: Re: Revolving door blessing.
by robartes (Priest) on Nov 06, 2002 at 09:49 UTC
    That's it. Perl will look for build_gui() and display() in oo::job, and, failing to find it, will search in its superclass, in this case oo::gui::defaultjob. BTW, if it didn't find these methods in oo::gui::defaultjob, it would travel further up the tree to Tk, so you can even call Tk methods on $job.

    CU
    Robartes-