stop closing over the type constraint object
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Collection.pm
index 8d63951..4754768 100644 (file)
@@ -50,7 +50,7 @@ sub _writer_value_needs_copy {
 
 sub _inline_tc_code {
     my $self = shift;
-    my ($value, $tc, $coercion, $tc_obj, $is_lazy) = @_;
+    my ($value, $tc, $coercion, $message, $is_lazy) = @_;
 
     return unless $self->_constraint_must_be_checked;
 
@@ -62,7 +62,7 @@ sub _inline_tc_code {
     else {
         return (
             $self->_inline_check_coercion($value, $tc, $coercion, $is_lazy),
-            $self->_inline_check_constraint($value, $tc, $tc_obj, $is_lazy),
+            $self->_inline_check_constraint($value, $tc, $message, $is_lazy),
         );
     }
 }