I think that this is a bad plan. You're adding another layer of potentially buggy code on top of what is already an inefficient mechanism (OO is slow).

I dont know how this could possibly make things easier. I would say that if you prefer Java style OO then program Java. Don't bother trying to force Perls OO into a Java style framework. Its not a good idea. You lose the flexibility of Perls OO model for what gain? The freedom to type $attribute instead of $self->{attribute}? Id say thats not freedom thats handcuffs. I use all kinds of underlying reference types for my OO. I have blessed scalars, blessed regexes, blessed code refs, blessed arrays, blessed globs, and of course the ubiqutous blessed hashes, not to mention a little bit of Inside Out Objects. If you choose to write Java in perl then you lose out on all this froody grooveyness.

I will add one thing however ++ to you for effort and originality. You probably learned heaps from doing this, but I would say that this is nothing more than a cool learning project that highlights Perls underlying flexibility and power. But having such flexibility doesnt mean you should exploit it just to remain comfortable. Better to learn Perls OO inside out and then decide if you really have gained anything with this approach. I bet youll come to the same conclusion I have.

As an added point, let me give you an analgy: You want to swim but you dont have much experience with it. But you have lots of experience walking. Does it make sense to wear lead shoes just so you can walk under water? No not at all. When you are in the water then swim when you are on land walk. Don't try to make swimming just like walking, the whole point of swimming is that its different from walking.


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi



In reply to Re: Overhead vs. ease of use in OOP by demerphq
in thread Overhead vs. ease of use in OOP by fletcher_the_dog

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.