I find it rather difficult to advise on this article and would suggest a different approach: Step back and describe the problem you're actually trying to solve. You seem to be stuck in "solution space", with some design decisions already made - but these might actually get in the way.

As an example, you write modules are intended as an abstraction of behaviours and scripts are generally the incarnation of these behaviours in the real life. I'd challenge that view and say that objects are the incarnations, and that you are (ab)using subclasses instead of different objects of the same class, each with their own attributes. Also, you seem to use scripts to store particular objects. All this might be justifiable, but I can't see how.

Also, the decision to be a fan of OO frameworks only when I will have the need to use all the features they provide seems questionable. You might fare better if you decide to embrace them as soon as they help to solve your problem. I am pretty sure that almost no one needs to use all the features of Perl itself, yet many of us are Perl fans, and quite happy with it.

So, perhaps the problem has occurred before. I don't recognize it. Chances are that some features of OO Perl frameworks have been created to solve your problem. Can you describe how you intend this to be used? Are users supposed to write their own modules, and how should they feed them to the system? Can you describe the problem without using the words "incarnation", "abstraction" and "design pattern"?


In reply to Re: Modules design pattern: abstraction vs incarnation (providing not so static data) by haj
in thread Modules design pattern: abstraction vs incarnation (providing not so static data) by Discipulus

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.