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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |