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

Type::Tiny support #83

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Type::Tiny support #83

wants to merge 4 commits into from

Conversation

dams
Copy link

@dams dams commented Jun 15, 2013

This is my attempt to have Type::Tiny support. It includes test and doc

You should probably review the API, especially the new parameters to use M::S I've added, you'll probably want to reword/change it.

This work allows users to choose which type library to choose (for now any_moose or type_tiny, and which additional types collections to add (by default Types::Standard is added)

Becase Type::Tiny allows to get rid of Mouse/Moose, I plan to work on removing the hard requirement on Mouse and Any::Moose, to Moo and MooX::late. Any::Moose says in its doc anyway: "Any::Moose - deprecated - use Moo instead!"

@dams dams mentioned this pull request Jun 15, 2013
@dams
Copy link
Author

dams commented Jun 15, 2013

@schwern raised the potential issue that detecting Type::Tiny types saved in scalars might be problematic, in the method ignatures.

However I don't think we should provide scalar types. Users should use provided Types::* types collections, or build their own additional types and add them to their own collections, and load them in M::Signature. So we never have types saved in scalars.

@tobyink
Copy link

tobyink commented Jul 5, 2013

It might be interesting to see how Physics-UEMColumn (which currently uses Method-Signatures, Moose and MooseX-Types) and Net-OAuth-LP (which currently uses Method-Signatures, Moo and Type-Tiny) behave with a Type-Tiny-based Method-Signatures.

@barefootcoder
Copy link
Contributor

It might be interesting to see how Physics-UEMColumn (which currently uses Method-Signatures, Moose and MooseX-Types) and Net-OAuth-LP (which currently uses Method-Signatures, Moo and Type-Tiny) behave with a Type-Tiny-based Method-Signatures.

Those are excellent suggestions. They could be guinea pigs to see if this whole crazy idea works or not. :-)

@dams
Copy link
Author

dams commented Jul 9, 2013

@tobyink I tried to use your patch but it doesn't work well in case of a Role or Class which has not yet been loaded at the time we call the ->_make_constraint. So I tried to defer this call and test for the presence of inline code when the string code is eval'ed, but I failed.

I'll have to come back to this, probably after having pushed a M::S version with Type::Tiny only.

@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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants