use Moose;
use Moose::Meta::TypeConstraint ();
-extends 'Moose::Meta::TypeConstraint';
+#extends 'Moose::Meta::TypeConstraint';
+extends 'MooseX::Meta::TypeConstraint::Structured::Positional';
with 'MooseX::Meta::TypeConstraint::Role::Structured';
=head1 NAME
->validate(1,'hello',[2]]);
as you might expect. Basically it sucks up args to the length of it's declared
-type constraints.
+type constraints. So Optional args are validated against the definition, but if
+they are missing this does not cause a validation error.
Please keep in mind the type constraint names given in this example are for
example use only and any similarity between them, actual Type Constraints and
=cut
-has 'containing_type_constraint' => (
- is=>'ro',
- does=>'MooseX::Meta::TypeConstraint::Role::Structured',
- required=>1,
-);
+#has 'containing_type_constraint' => (
+# is=>'ro',
+# does=>'MooseX::Meta::TypeConstraint::Role::Structured',
+# required=>1,
+#);
=head2 signature
=cut
-sub _normalize_args {
- return shift->containing_type_constraint->_normalize_args(@_);
-}
+#sub _normalize_args {
+# return shift->containing_type_constraint->_normalize_args(@_);
+#}
=head2 constraint
=cut
-sub constraint {
- return shift->containing_type_constraint->constraint(@_);
-}
+#sub constraint {
+# return 1;
+ # return shift->containing_type_constraint->constraint(@_);
+#}
-=head2 parse_parameter_str ($str)
+=head2 _parse_type_parameter ($str)
Given a $string that is the parameter information part of a parameterized
constraint, parses it for internal constraint information. This is delegated
=cut
-sub parse_parameter_str {
- return shift->containing_type_constraint->parse_parameter_str(@_);
-}
+#sub _parse_type_parameter {
+# return shift->containing_type_constraint->_parse_type_parameter(@_);
+#}
=head2 signature_equals
=cut
-sub signature_equals {
- return shift->containing_type_constraint->signature_equals(@_);
-}
+#sub signature_equals {
+# return shift->containing_type_constraint->signature_equals(@_);
+#}
=head1 AUTHOR