GrandFather:
The bottom line is that the derived class has to disambiguate access to base class members as required.
----
*Ding*....that's not the answer I wanted to hear! :-)

Not sure how it would be "implemented" internally, but my "SuperDeluxe" preference would be to explain to perl that "$s" (handle to left parent) should be used for left-parent accesses, and "$w" (handle to right parent) should be used for right-parent accesses.

Something on the order of:

@ISA=qw(Sclass, Wclass); .... new(){ my $s=Sclass->new(); TELL_ISA_LOOKUP_USING(Sclass, 'self') #(self=this class's handle) # and use the "wclass_handle_field as handle for Wclass: TELL_ISA_LOOKUP_USING(Wclass, 'self'->{'wclass_handle_field'}) .... }
"Seems" like any class other than the 1st parent is a bit like a "second class citizen": can't specify in "use base(...)", and inheritance is only handled automatically for the left-most ISA member. Any other use of multiple inheritance, and it seems like it's mostly "do it yourself". Can't even have "structs" that are nested because of a disallowing of any "inherited" structs (as in "use struct...") -- was going to use that module (actually was using), until I got to next 'struct' further up....then I realized what I wanted to do wasn't supported...*sigh*.

Thanks much -- I was just hoping I didn't understand something, since it seems like manual disambiguation and making sure correct handles are used with correct ancestor really is _not_ "multiple inheritance" -- since how can "MI" ever work "automatically", if non-primary base classes are always passed the handle to the primary base class? :-(


In reply to Re^2: How to do multiple inheritance? by perl-diddler
in thread How to do multiple inheritance? 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.