got all the tests working again, and basic type tests in place
[gitmo/MooseX-Dependent.git] / lib / MooseX / Dependent / Types.pm
index a3dd92f..371459a 100644 (file)
@@ -95,12 +95,12 @@ Or you could have done the following instead (example of re-paramterizing)
                };
 
        ## subtype Range to re-parameterize Range with subtypes
-       subtype PositveRange,
+       subtype PositiveRange,
                as Range[max=>PositiveInt, min=>PositiveInt];
        
        ## create subtype via reparameterizing
        subtype PositiveRangedInt,
-               as RangedInt[PositveRange];
+               as RangedInt[PositiveRange];
 
 Notice how re-parameterizing the dependent type 'RangedInt' works slightly
 differently from re-parameterizing 'PositiveRange'?  Although it initially takes
@@ -198,6 +198,7 @@ Moose::Util::TypeConstraints::get_type_constraint_registry->add_type_constraint(
     MooseX::Dependent::Meta::TypeConstraint::Dependent->new(
         name => 'MooseX::Dependent::Types::Dependent',
         parent => find_type_constraint('Any'),
+               constraint => sub {1},
     )
 );