Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to choose Mouse or Moose #35

Open
schwern opened this issue Sep 24, 2011 · 3 comments
Open

Switch to choose Mouse or Moose #35

schwern opened this issue Sep 24, 2011 · 3 comments

Comments

@schwern
Copy link
Contributor

schwern commented Sep 24, 2011

Add a lexical, compile time switch to allow the user to choose which type system will be used, Moose or Mouse (or a 3rd thing we may add in the future). This would override Any::Moose.

It could be used both for performance and for a non-M[ou]se class to decide which set of types it wants to use.

Related to #34.

@chloe-zen
Copy link

Disagree. Detecting what the class is already using, with Any::Moose as default, is a good solution. If a user controls Any::Moose, he controls MS and anything else using it.

@schwern
Copy link
Contributor Author

schwern commented Sep 27, 2011

I might have not been clear. This is in addition to the Moose/Mouse detection, not instead of.

For example, if this and #34 were implemented...

package Foo;

use Method::Signatures;  # uses Any::Moose to resolve Foo's type checks (the default)

package Bar;

use Mouse;
use Method::Signatures;  # uses Mouse for Bar' s methods because Bar isa Mouse (as proposed in #34)

package Baz;

use Method::Signatures { types => "Moose" };  # uses Moose for Baz because the user asked for it

And I don't think I understand what "if a user controls Any::Moose, he controls MS and anything else using it" means. Could you explain?

@chloe-zen
Copy link

My comment was nonsensical in retrospect; please ignore it. Sorry.

@schwern schwern added the Types label Mar 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants