more pod and clarified license
[gitmo/MooseX-Dependent.git] / lib / MooseX / Dependent / Meta / TypeConstraint / Dependent.pm
index 1b68da6..359685d 100644 (file)
@@ -20,6 +20,11 @@ see L<MooseX::Dependent> for examples and details of how to use dependent
 types.  This class is a subclass of L<Moose::Meta::TypeConstraint> which
 provides the gut functionality to enable dependent type constraints.
 
+This class is not intended for public consumption.  Please don't subclass it
+or rely on it.  Chances are high stuff here is going to change a lot.  For
+example, I will probably refactor this into several classes to get rid of all
+the ugly conditionals.
+
 =head1 ATTRIBUTES
 
 This class defines the following attributes.
@@ -345,22 +350,17 @@ around 'coerce' => sub {
     
     if($self->has_constraining_value) {
         push @args, $self->constraining_value;
-        ##Checking the type_coercion_map is probably evil
         if(@{$self->coercion->type_coercion_map}) {
             my $coercion = $self->coercion;
-            warn "coercion map found in $coercion found for $self";
             my $coerced = $self->$coerce(@args);
             if(defined $coerced) {
-                warn "got coerced args of ", $coerced;
                 return $coerced;
             } else {
                 my $parent = $self->parent;
-                warn "no coercion for $self, using $parent";
                 return $parent->coerce(@args); 
             }
         } else {
             my $parent = $self->parent;
-            #warn "no coercion for $self, using $parent";
             return $parent->coerce(@args); 
         } 
     }