Let Mom Help You With Object-Oriented Programming
Mom is a shortcut for creating Moo classes (and roles). It allows you to define a Moo class with the brevity of Class::Tiny. (In fact, Mom is even briefer.)
A simple example:
Mom allows you to use Moo features beyond simply declaring Class::Tiny-like attributes though. You can choose whether attributes are read-only, read-write, or read-write-private, whether they're required or optional, specify type constraints, defaults, etc.
An example using just some of these features:
If even that isn't enough, Mom exports all the standard Moo has
, with
, etc keywords, so there's no need to choose between Mom and Moo.
Just curious, ever had a look at https://metacpan.org/pod/Mu and https://metacpan.org/pod/MooX::ShortHas ?
The Mom documentation includes a comparison with MooX::ShortHas.