If nothing else, having the initialisation class in the inheritance tree via @ISA, is baggage, if there are no other methods than _init().
Well, calling two one element arrays "baggage" is stretching the meaning of "baggage". But even so, it's not baggage attached to any instance of the class. Just the classes themselves.
Looking back at the OPs code, there seems to be little reason for calling the _init() routines as methods rather than subroutines.
Hmm, yeah, but that seems to be true of at least 95% of OO code written. I'm not the worlds biggest OO fan, but if I were to do something like the OP, I'd use 3 classes as well, with two classes having just an init method (but with the inheritance tree as showed elsewhere in the thread).
Indeed, as no instance of the initialisation classes is ever instantiated, it could equally be termed "poor OO".
Really? You only use inheritance if you instantiate every class of your inheritance tree? (Or do you write "poor OO" code?)
If the idea is simple to provide two methods of initialisation, better I would say to have them both in the main My package space called (say) _initFromXML() and _initFromJSON() and ditch the extra package spaces entirely.
While certainly possible, it's not something I would do.

In reply to Re^4: Conditional inheritance strategy by JavaFan
in thread Conditional inheritance strategy by citromatik

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.