A great alternative when Moo is a bit too much for you. Useful for scripts that must start really fast. Mind you, Moo loads about 5K lines of code and more than a dozen files, all of which takes +- 10ms on my computer. Mo on the other hand is only a single line of +-500 characters, and it's inlinable. It loads in under 1ms. If a script must be executed thousands of times a day, that 9ms difference will matter more.
I use this for a very lightweight parent class. A richer subclass then uses Moo.
Isn't it great that we have the choices and upgrade path from the very minimal Mo, to Moo for normal cases, to Moos and Moose for even richer (but heavier) alternatives. Truly TIMTOWTDI!
When I first looked at Mo I thought it was a joke. Then I saw the contributors, and the half-dozen or so modules on CPAN that are already using it. Then I gave it a test drive, and I'm really impressed. It does a lot with such a tiny footprint.
I'll be using Moose for my application, but for scripts where a quick startup time is a must (such as dev-ops-ish scripts run by humans, or scripts that are run many times in one go) I'll be turning to Mo in the future.
As long as I'm here I'd like to add a wishlist item: Supporting isa ala Moo with coderefs.
This is like a nano-Moose. As proposed in the docs, I inlined this code in a little CGI script and then had the convenience to create throw-away classes that don't need have have more than some accessors and methods.
And could do it in Moose style. Very nice!
I'll use Mo instead of Object::Tiny in new few-liners with this one as it offers a nice upgrade path to Moose.