[sf-perl] Mouse, again?

yary not.com at gmail.com
Fri Mar 2 06:54:42 PST 2012


> Joseph Brenner <doom at kzsu.stanford.edu> wrote:
>
>
> Can someone refresh my memory about
>
> the problems are supposed to be with using Mouse?
> Quinn Weaver <quinn at pgexperts.com> wrote:
>
> "Mouse?" Predictably, all my web searches are returning
> the wrong thing.


Seems like the thing to search for is "moose mouse perl", or blekko
"mouse /perl "

>From an answer to
http://stackoverflow.com/questions/980751/should-i-learn-perl-5-oo-or-moose-first
"Finally there is no reason to use Mouse (an alternative to Moose)
unless you fall into two very specific categories, you have hard start
up time constraints or hard dependency requirements. If you don't fall
into those two places Moose will almost always be a better answer.

Disclosure: I'm a core Moose developer, and have worked on and with Mouse."


>From http://blog.jdpfu.com/2011/12/02/of-moose-mouse-moo-and-mo-for-oo-perl
(That page also has a chart showing what features the various Moose
alternatives provide)
"Mouse is a Moose compatible object system. They do warn that Mouse is
a little sloppier than Moose, so if you run into weird errors, it
could be Mouse causing them. They claim that running s/Mouse/Moose/g
on your code will work."



>From the comments at http://bugsplat.info/2010-05-09-moose-vs-mouse.html
"I've been told the main reason for using Moose over Mouse is that
Moose is extensible Mouse isn't... Not sure I really understand it
all. But thanks for the tips."


Maybe the mouse-squashing is related to a hope Moose's performance
will catch up. From https://news.ycombinator.com/item?id=1332571
	
----- wazoox 662 days ago | link
In my understanding Mouse is to become irrelevant someday, as Moose
goes forward.

----- autarch 662 days ago | link
That's the long-term goal, but to make that happen is pretty hard.

One possibility is implementing some sort of XS for all Moose core
features, and using XS to implement Moose-based classes (Mouse already
does this).

Another project which has been worked on, but has somewhat stalled, is
a Moose "compiler" which would generate .pmc files for your classes.
Unless you used the meta-model at runtime (most code doesn't), you'd
never even need to load Moose.

Patches welcome, of course. If anyone's interested in these projects,
join us at irc://irc.perl.org/#moose to discuss then.


-y


More information about the SanFrancisco-pm mailing list