Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6646089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:22:23+00:00 2026-05-26T00:22:23+00:00

I realise that this is not generally possible for all MooseX modules, particularly where

  • 0

I realise that this is not generally possible for all MooseX modules, particularly where the module delves into the meta class where Moose and Mouse differ.

But this question arose because sometimes a MooseX module doesn’t have an equivalent in the MouseX namespace, and I found that I could still use the MooseX module within my Mouse classes. But I want to ask this question in general, even if there is a MouseX equivalent available (let’s say I’m too lazy to install the MouseX one, or the MooseX version is more recent with new features).

For example, the following is valid:

package Foo;
use Mouse;
use MooseX::Types::Common::Numeric 'PositiveInt';
has 'bar' => (
    is => 'rw',
    isa => PositiveInt,
);

When I looked into MouseX::Types::Common::Numeric source it was almost an exact copy of MooseX::Types::Common::Numeric, though there were differences in MouseX::Types which is a dependency. Since it is perl code there is no particular performance benefit in using the MouseX module either.

So if we have a Mouse class and a choice of using equivalent MooseX and MouseX modules, what reasons would we have to choose the MouseX option? Why have the MouseX equivalent anyway?

btw, how should we relate to this with Any::Moose?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:22:24+00:00Added an answer on May 26, 2026 at 12:22 am

    The point of using Mouse is to have access to most features of Moose while eliminating its expensive startup time and Yggdrasil-like dependency tree. If you’re using a MooseX module with it, that module brings in Moose, or at least Moose::Exporter/Moose::Role, and you’ve then eliminated the benefits of Mouse. Observe:

    rsimoes@desk-o-simoes:~$ time perl -MMouse -e 1
    
    real    0m0.026s
    user    0m0.020s
    sys     0m0.000s
    
    rsimoes@desk-o-simoes:~$ time perl -MMouse -MMouseX::Types::Common::Numeric -e 1
    
    real    0m0.032s
    user    0m0.030s
    sys     0m0.000s
    

    So fast! But then:

    rsimoes@desk-o-simoes:~$ time perl -MMoose -e 1
    
    real    0m0.148s
    user    0m0.120s
    sys     0m0.020s
    
    rsimoes@desk-o-simoes:~$ time perl -MMouse -MMooseX::Types::Common::Numeric -e 1
    
    real    0m0.181s
    user    0m0.150s
    sys     0m0.020s
    

    So slow. But if those startup times don’t matter for what you’re doing, You shouldn’t even be bothering with Mouse to begin with.

    Any::Moose exists to allow a Moose-oriented module to use Mouse unless Moose is already loaded, in which case it’ll just use that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I realise that this is a very basic question, but it is one which
I realize that this would be COMPLETELY bad practice in normal situations, but this
I realize that this question is impossible to answer absolutely, but I'm only after
I realize that this question has been asked 100times but none that I have
Ok so I realize that this is a pretty vague question, but bear with
While I realize that this question has been asked once or twice ago but
I realize that the query this question is looking for won't be enough to
I realize that the answer to this question is likely quite obvious (if somewhat
I've done numerous searches and I realize that I can just download this file
I asked this question in the restkit google group, but realize now that it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.