bump version to 0.65
[gitmo/Moose.git] / lib / Moose / Meta / TypeConstraint / Class.pm
index 39b45e0..6cdc477 100644 (file)
@@ -7,7 +7,7 @@ use metaclass;
 use Scalar::Util 'blessed';
 use Moose::Util::TypeConstraints ();
 
-our $VERSION   = '0.59';
+our $VERSION   = '0.65';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -97,6 +97,15 @@ sub is_subtype_of {
     }
 }
 
+# This is a bit counter-intuitive, but a child type of a Class type
+# constraint is not itself a Class type constraint (it has no class
+# attribute). This whole create_child_type thing needs some changing
+# though, probably making MMC->new a factory or something.
+sub create_child_type {
+    my ($self, @args) = @_;
+    return Moose::Meta::TypeConstraint->new(@args, parent => $self);
+}
+
 1;
 
 __END__
@@ -131,6 +140,8 @@ Return all the parent types, corresponding to the parent classes.
 
 =item B<meta>
 
+=item B<create_child_type>
+
 =back
 
 =head1 BUGS