diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index 34af690aa..6493fc882 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -693,7 +693,8 @@ sub _inline_check_constraint { 'type_constraint_message => $msg , '. 'class_name => $class_name, '. 'attribute_name => "'.$attr_name.'",'. - 'value => '.$value + 'value => '.$value, + $value ).';', '}', ); @@ -708,7 +709,8 @@ sub _inline_check_constraint { 'type_constraint_message => $msg , '. 'class_name => $class_name, '. 'attribute_name => "'.$attr_name.'",'. - 'value => '.$value + 'value => '.$value, + $value ).';', '}', ); diff --git a/lib/Moose/Meta/Method/Accessor/Native/Collection.pm b/lib/Moose/Meta/Method/Accessor/Native/Collection.pm index 67331d52b..c5f7e1a4a 100644 --- a/lib/Moose/Meta/Method/Accessor/Native/Collection.pm +++ b/lib/Moose/Meta/Method/Accessor/Native/Collection.pm @@ -115,6 +115,7 @@ sub _inline_check_member_constraint { 'class_name => $class_name,'. 'value => $new_val,'. 'new_member => 1', + '$new_val' ) . ';', '}', '}',