Let me first say that I am biased being the original author of Moose. However, let me also say that I am good friends with the author of Mouse and that he is also one of the core members of the Moose cabal. Moose and Mouse are not in competition with one another, and the primary motivation behind Mouse has always been to serve as a stop-gap measure to get Moose-ey goodness in places where a Moose would never fit.
Now, that said, let me tell you why you should use Moose.
First off, the reasons to use Mouse are as follows:
- You have hard requirements for fast startup time. Examples of this are: (some) command line apps, vanilla CGI scripts (hello, 1997 called they want their technology back) and scripts that have hard time requirements (you must execute in this 30 second window, etc etc)
- You have hard requirements for minimizing memory usage.
- You have issues with module/application deployment, such as IT staff that don't like to install from CPAN or some kind of secure/restricted environment.
If you did
not say "Yes" to any of these reasons, then you really should use
Moose and not
Mouse. And here are some reasons why ...
- Moose is just over 3 years old now and has been running in several non-trivial production applications for that entire time. Mouse on the other hand is not even a year old yet and while it is used very seriously by a number of people, it just isn't as battle tested as Moose is.
- Moose's startup speed and memory consumption issues will eventually get solved at which point Mouse will very likely be deprecated *. Like I said above, Mouse is a stop-gap measure, not a long term solution.
- Moose has many MooseX:: modules to extend Moose itself, many of which would not be possible to do with Mouse. While there has been a few MouseX:: modules uploaded recently, they are mostly just Mouse-ifications of MooseX:: modules.
- Moose brings with it all the power of metaprogramming through the MOP (Class::MOP to be exact). Even if you don't use the MOP that much, just having it there when you need it can be really useful.
Now to address a few of your items directly...
As we will have some long-running processes we cannot tolerate any memory-leaks and the like.
As far as I know neither Mouse nor Moose have memory leaks. Some older leak detection modules will claim that Moose does, but those are the meta-objects that power Moose and not leaks.
My current feeling (I have not done much testing yet) is that the run-time performance of Moose will not be very much different from Mouse ...
This is true, I think Mouse right now is a little bit faster then Moose but not by enough that your app would likely notice (unless you app is a ray tracer or something like that). This also may change soon as there is lots of work going on to XS-ify the Moose accessors.
So in conclusion, ... use Moose :)
* - The best way to future proof against the eventual deprecation of Mouse is to to use Any::Moose.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.