Tuesday, May 8, 2012

Are moose heavy? There's mouse.

I happened across Mouse in the dependency chart of an Amazon Route53 module, so I looked it up.
  • Mouse is meant to be lighter than Moose, and compile faster (for CLI and primordial CGI).
  • Mouse wants to let you do s/Mouse/Moose/g and have nothing break, if it turns out Mouse isn't heavy enough.
  • Mouse also exports warnings and strict for you when you use it.
  • Mouse basically doesn't want to have MouseX.
  • Any::Moose gives you Moose if that is already loaded, or Mouse otherwise.
So there you have it: Mouse is a lightweight Moose.  Without antlers.

Updated 2013 Feb 11: Apparently there's also Moo and it's preferred, at least for today.  Because one isn't enough in Perl.

No comments: