I have a call-graph that doesn't seem to work with the standard or 'c3' mro's:

<main>____ / \ \ <CP> <SW> <V(main)> \ \ <V(CP)> <V(SW)> Note: 'V(x) != V(y)'

Different error messages for the default and c3 mro's:

mro:c3: Inconsistent hierarchy during C3 merge of class 'SW': current merge results [ SW, ] merging failed on 'D' at src line. main::BEGIN() called at src line eval {...} called at src line BEGIN failed--compilation aborted at src line. Inconsistent hierarchy during C3 merge of class 'SW': current merge results [ SW, ] merging failed on 'D' at src line during global destruction. mro:default: main::ISA=["CP", "SW", "D"] Can't locate object method "cp_new" via package "D" at src line. at src line.

Also tried adding CP onto 'end' of @ISA, as the ClientProc has the "cp_new" method I need, but that didn't work either.

Is there a mro that supports (or can be configured to support) a D-module being called multiple times in the hierarchy. Of note: the calls creating 'D', pass different args to "new", that define different subs-by-name in the caller.

In some way, it's like a call to exporter -- with the EXPORTS list (et al.) being a parameter list of subs to export to future users of the original module.

Solutions to make the above work would be very welcome.

Thanks!

In reply to mro's which to use for flexibility? 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.