Switch from Moose to Mouse, 20-30% speed improvement #73

merged 3 commits into from Jan 11, 2013


None yet

3 participants

schwern commented Jan 11, 2013

Pretty trivial change, only two hiccups. Had to leave in some Moose deps because they extend or consume Moose classes or roles.

Test suite dropped from 25s to 20s. t/sqitch foo went from 650ms to 500ms.

schwern added some commits Jan 11, 2013
@schwern schwern Switch classes from Moose to Mouse.
This is just getting the classes switched.  Fortunately there's MouseX versions
of everything in use.

There's failures which will be addressed later.

Left a handful of the Moose classes in either because they're consuming Moose
roles or extending Moose classes.
@schwern schwern Mouse::Util::TypeConstraints does not have maybe_type, do the equival…
@schwern schwern Mouse appears to have a bug with $attr->default($instance). Work arou…
…nd it.
theory commented Jan 11, 2013


  • Require Mouse v1.02
  • Require MouseX::Types::Path::Class v0.06.
  • Require Mouse::Meta::Attribute::Native v1.04 or v1.05
theory commented Jan 11, 2013

Ref #69.

@theory theory merged commit 3a2971c into theory:master Jan 11, 2013
gfx commented Jan 11, 2013

Hi, I fixed those incompatibilities as of Mouse 1.04, i.e. maybe_type() and $attr->default($instance).
So I recommend you to use new APIs for ease.

theory commented Jan 11, 2013

Cool, thanks @gfx!

@theory theory added a commit that referenced this pull request Jan 11, 2013
@theory Restore use of maybe_type and bare `default()` calls.
Requires Mouse 1.04. Ref #73.
@schwern schwern referenced this pull request in thaljef/Pinto May 2, 2013

Switch To Moo #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment