removed some debug stuff
[gitmo/Moose.git] / lib / Moose / Meta / TypeConstraint.pm
index cf57851..05a3f44 100644 (file)
@@ -12,7 +12,7 @@ use Scalar::Util qw(blessed refaddr);
 
 use base qw(Class::MOP::Object);
 
-our $VERSION   = '0.57';
+our $VERSION   = '0.59';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -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