Commit | Line | Data |
3c0a590c |
1 | package ## Hide from PAUSE |
2 | MooseX::Meta::TypeConstraint::Structured::Optional; |
abd193e2 |
3 | |
4 | use Moose; |
5 | use MooseX::Meta::TypeCoercion::Structured::Optional; |
6 | |
7 | extends 'Moose::Meta::TypeConstraint::Parameterizable'; |
8 | |
9 | around parameterize => sub { |
10 | my $orig = shift; |
11 | my $self = shift; |
12 | |
13 | my $ret = $self->$orig(@_); |
14 | |
15 | $ret->coercion(MooseX::Meta::TypeCoercion::Structured::Optional->new(type_constraint => $ret)); |
16 | |
17 | return $ret; |
18 | }; |
19 | |
20 | __PACKAGE__->meta->make_immutable(inline_constructor => 0); |
21 | |
22 | 1; |