From 7d4c36b072f729f54bd57c406598e8a008fca6ca Mon Sep 17 00:00:00 2001 From: Upasana Date: Sun, 26 Apr 2015 22:38:06 +0530 Subject: [PATCH] Small change for MooseX::Attribute::TypeConstraint::CustomizeFatal --- lib/Moose/Meta/Attribute.pm | 6 ++++-- lib/Moose/Meta/Method/Accessor/Native/Collection.pm | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) 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' ) . ';', '}', '}',