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

Support | overload to work better with MooseX::Types #156

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

Conversation

colinnewell
Copy link

Copied override from MooseX::Types::TypeDecorator to allow
union from all types. In theory this should mean we can
remove it from MooseX::Types.

Allow:

my $type2 = $type1 | class_type('Bar');

as well as:

my $type1 = HashRef | class_type('Foo');

For RT#98809

Copied override from MooseX::Types::TypeDecorator to allow
union from all types.  In theory this should mean we can
remove it from MooseX::Types.

Allow:

    my $type2 = $type1 | class_type('Bar');

as well as:

    my $type1 = HashRef | class_type('Foo');

For RT#98809.
@haarg
Copy link
Member

haarg commented Nov 23, 2017

I don't think I like this as an internal part of Moose.

@haarg
Copy link
Member

haarg commented Nov 23, 2017

To clarify, it isn't obvious what value this provides by being built in to the type system. The examples given could be done within the MooseX::Types system without involving the Moose internals. And it isn't providing any new functionality, only syntax sugar.

@karenetheridge
Copy link
Member

karenetheridge commented Nov 23, 2017 via email

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

Successfully merging this pull request may close these issues.

3 participants