Add comments
gfx [Sat, 31 Oct 2009 08:20:10 +0000 (17:20 +0900)]
lib/Mouse/Meta/TypeConstraint.pm

index 5687626..3d2f195 100644 (file)
@@ -249,11 +249,12 @@ sub parameterize{
         || Carp::confess("The $name constraint cannot be used, because $param doesn't subtype from a parameterizable type");
 
     return Mouse::Meta::TypeConstraint->new(
-        name               => $name,
-        parent             => $self,
-        constraint         => $generator->($param),
+        name        => $name,
+        parent      => $self,
+        parameter   => $param,
+        constraint  => $generator->($param), # must be 'constraint', not 'optimized'
 
-        type               => 'Parameterized',
+        type        => 'Parameterized',
     );
 }