in reply to Re: Using the strict module in object oriented programming
in thread Using the strict module in object oriented programming

While I am still amazed of the power and flexibility of Perl's own OO system, I'm at least as amazed of what Moose got out of it.

Sometimes there is too much flexibility.

Moose is built on Class::MOP, which implements a meta-object protocol. The MOP lays out a well-defined abstraction for the components of an object system and how they are supposed to behave and interact. That well-defined abstraction is what the Perl object system lacks, so Class::MOP builds one on top of the Perl object system and has it provide the API for things like Moose.

Many kudos for stvn for his work on it. (And more kudos for his explaining the MOP to me at YAPC in simple words I could understand.)

For more on MOP:

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

  • Comment on Re^2: Using the strict module in object oriented programming

Replies are listed 'Best First'.
Re^3: Using the strict module in object oriented programming
by phaylon (Curate) on Jul 26, 2006 at 10:20 UTC
    Sometimes there is too much flexibility.

    Moose is built on Class::MOP, which implements a meta-object protocol. The MOP lays out a well-defined abstraction for the components of an object system and how they are supposed to behave and interact. That well-defined abstraction is what the Perl object system lacks, so Class::MOP builds one on top of the Perl object system and has it provide the API for things like Moose.
    I respectfully but hardly disagree. Without the flexibility, we'd have one solution. Maybe it would be like Moose, maybe it would be another. But it certainly couldn't evolve in the way it does. So, for my part: Hooray for flexibility.

    YMMV.

    Ordinary morality is for ordinary people. -- Aleister Crowley
      Without the flexibility, we'd have one solution

      This is not about black or white. MOP doesn't eliminate flexibility, it just defines an interface around it.

      -xdg

      Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

        Yes, but MOP based on a more abstract implementation is in my eyes more flexible than just having one MOP implementation. What I meant was that I'm comfortable with not being tied to that MOP system. It's much more enjoyable to use if that decision is up to you.

        Ordinary morality is for ordinary people. -- Aleister Crowley