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); }
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 | |
by tobyink (Canon) on Aug 22, 2013 at 06:48 UTC |
Back to
Perl News