[sf-perl] Mouse, again?

yary not.com at gmail.com
Mon Mar 5 15:16:40 PST 2012

On Mon, Mar 5, 2012 at 6:09 PM, Joseph Brenner
<doom at kzsu.stanford.edu> wrote: ...
> (b) I write a bunch of code that uses Mouse.
> (c) later, Moose gets installed.  Note: the person doing this might
> not have thought about it very much, it might just be a dependency of
> something else they're experimenting with.
> (d) the code that I've written develops some odd performance problems,
> despite the fact that nothing has apparently changed with it.

"Any::Moose" picks Mouse if it is available, then falls back to Moose.
Unless the end user requests Moose. From the docs:

"By default, Mouse will be provided to libraries, unless Moose is
already loaded -or- explicitly requested by the end-user. The end-user
can force the decision of which backend to use by setting the
environment variable ANY_MOOSE to be Moose or Mouse.

Note that the decision of which backend to use is made only once, so
that if Any-Moose picks Mouse, then a third-party library loads Moose,
anything else that uses Any-Moose will continue to pick Mouse.

So, if you have to use Mouse, please be considerate to the Moose
fanboys (like myself!) and use Any-Moose instead. :)"


More information about the SanFrancisco-pm mailing list