better error messages
[gitmo/MooseX-Dependent.git] / lib / MooseX / Meta / TypeConstraint / Parameterizable.pm
index 3afb43d..9548ae7 100644 (file)
@@ -76,15 +76,15 @@ has 'constraining_value' => (
 
 This class defines the following methods.
 
-=head2 BUILD
+=head2 new
 
 Do some post build stuff
 
 =cut
 
 ## Right now I add in the parameterizable type coercion until I can merge some Moose
-## changes upstream.  TODO change to BUILD or something
-
+## changes upstream.
 around 'new' => sub {
     my ($new, $class, @args) = @_;
     my $self = $class->$new(@args);
@@ -95,7 +95,7 @@ around 'new' => sub {
 
 =head2 parameterize (@args)
 
-Given a ref of type constraints, create a structured type.
+Given a ref of type constraints, create a parameterized constraint
     
 =cut
 
@@ -195,6 +195,7 @@ sub parameterize {
                     constraining_value => $args,
                     parent_type_constraint=>$self->parent_type_constraint,
                     constraining_value_type_constraint => $self->constraining_value_type_constraint,
+                    message => $self->message,
                 );
                 
                 ## TODO This is probably going to have to go away (too many things added to the registry)
@@ -396,6 +397,5 @@ it under the same terms as Perl itself.
 
 =cut
 
-1;
-##__PACKAGE__->meta->make_immutable(inline_constructor => 0);
+__PACKAGE__->meta->make_immutable(inline_constructor => 0);