The experimental Moops
module is another syntax extension that works fairly similar. It is inspired by MooseX::Declare (but is faster) and by the p5-mop project that is trying to bring such syntax into core perl.
Your example would translate without significant changes. If you want to specify a MOP backend, you can declare a class like class Foo using Moose
, but it defaults to Moo
, which is simpler than Moose.