use Moose;
use Moose::Util::TypeConstraints ();
+use MooseX::Dependent::Meta::TypeCoercion::Dependent;
use Scalar::Util qw(blessed);
use Data::Dump;
use Digest::MD5;
This class defines the following methods.
+=head2 BUILD
+
+Do some post build stuff
+
+=cut
+
+sub BUILD {
+ my ($self) = @_;
+ $self->coercion(
+ MooseX::Dependent::Meta::TypeCoercion::Dependent->new(
+ type_constraint => $self,
+ ));
+}
+
=head2 parameterize (@args)
Given a ref of type constraints, create a structured type.
parent_type_constraint=>$self->parent_type_constraint,
constraining_value_type_constraint => $self->constraining_value_type_constraint,
);
+
+ ## TODO This is probably going to have to go away (too many things added to the registry)
Moose::Util::TypeConstraints::get_type_constraint_registry->add_type_constraint($type_constraint);
return $type_constraint;
}