removed some debug stuff
[gitmo/Moose.git] / lib / Moose / Meta / TypeConstraint.pm
index 7837234..05a3f44 100644 (file)
@@ -246,6 +246,12 @@ sub _collect_all_parents {
     return @parents;
 }
 
+sub create_childtype {
+    my ($self, %opts) = @_;
+    my $class = ref $self;
+    return $class->new(%opts, parent => $self);
+}
+
 ## this should get deprecated actually ...
 
 sub union { Carp::croak "DEPRECATED" }
@@ -347,6 +353,8 @@ Returns true if this type has a parent type.
 
 =item B<has_hand_optimized_type_constraint>
 
+=item B<create_childtype>
+
 =back
 
 =head2 DEPRECATED METHOD