package ## Hide from PAUSE
- MooseX::Meta::TypeCoercion::Dependent;
+ MooseX::Dependent::Meta::TypeCoercion::Dependent;
use Moose;
extends 'Moose::Meta::TypeCoercion';
=head1 NAME
-MooseX::Meta::TypeCoercion::Dependent - Coerce structured type constraints.
+MooseX::Meta::TypeCoercion::Dependent - Coerce Dependent type constraints.
=head1 DESCRIPTION
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;
}
-use Test::More tests=>3; {
+use Test::More tests=>4; {
use strict;
use warnings;
use_ok 'MooseX::Dependent';
use_ok 'MooseX::Dependent::Types';
use_ok 'MooseX::Dependent::Meta::TypeConstraint::Dependent';
+ use_ok 'MooseX::Dependent::Meta::TypeCoercion::Dependent';
}