http://www.perlmonks.org?node_id=1050432

Moops is sugar for writing object-oriented Perl. It provides similar syntax to MooseX::Declare and Stevan Little's p5-mop-redux.

It's some glue between Moo, Type::Tiny, Function::Parameters and Try::Tiny, but for those occasions when you want the backing of a meta object protocol, allows you to easily swap Moose (or even Mouse) in place of Moo with very minimal changes.

Here's an example of a complete, usable class definition in Moops:

use Moops; class Person :ro { has first_name => (isa => Str); has last_name => (isa => Str); }

Read more at blogs.perl.org

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name"

Replies are listed 'Best First'.
Re: Introducing Moops
by Anonymous Monk on Aug 22, 2013 at 02:31 UTC

    but for those occasions when you want the backing of a meta object protocol,

    When is that?

      The MOP is useful when you need to perform lots of class introspection. It's therefore a requirement for a lot of class-building extensions - i.e. most of the MooseX namespace, such as MooseX::Clone, MooseX::Privacy, MooseX::MultiMethods, etc.

      That is; you probably want to use Moose if there's some MooseX module that catches your eye, or you need to delve into $class->meta; and use Moo otherwise.

      use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name"