in reply to Philosophy of a "new" method

Should it be a barebones outline of the object?
Even that's too much IMO.

I prefer my new methods to do nothing beside creating a blessed ref and returning it.

Separating object construction and object configuration makes MI much easier.

Of course, if you believe in monsters under your bed, you probably also subscribe to the "MI is scary, don't do it!" philosophy. But this is Perl, not Java. Not only is MI possible in Perl, the *language* doesn't place more hurdles in your way than it already does with OO in general. It's just the classical way of "let's have a method that starts with nothing, return a fully configured object" that makes MI harder than it should be.

Replies are listed 'Best First'.
Re^2: Philosophy of a "new" method
by rastoboy (Monk) on Feb 04, 2011 at 15:07 UTC
    Erm, what's MI?

      It's latin short-hand for the work of the devil :)

      I'd go hide under the bed, but there be monsters!


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
      Multiple Inheritance.