From: Shawn M Moore Date: Wed, 15 Apr 2009 06:41:36 +0000 (-0400) Subject: Use $value instead of $_ in the constructor, since $_ is getting X-Git-Tag: 0.22~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ab35ab254f6c167b007fc872b40a75f5314d044c;p=gitmo%2FMouse.git Use $value instead of $_ in the constructor, since $_ is getting clobbered --- diff --git a/lib/Mouse/Meta/Method/Constructor.pm b/lib/Mouse/Meta/Method/Constructor.pm index 8d110da..d205492 100644 --- a/lib/Mouse/Meta/Method/Constructor.pm +++ b/lib/Mouse/Meta/Method/Constructor.pm @@ -61,7 +61,7 @@ sub _generate_processattrs { } $code .= " \$attrs[$index]->verify_type_constraint_error( - '$key', \$_, \$attrs[$index]->type_constraint + '$key', \$value, \$attrs[$index]->type_constraint ) } "; @@ -117,7 +117,7 @@ sub _generate_processattrs { if ($attr->has_type_constraint) { $code .= "{ unless (\$attrs[$index]->{type_constraint}->check(\$value)) { - \$attrs[$index]->verify_type_constraint_error('$key', \$_, \$attrs[$index]->type_constraint) + \$attrs[$index]->verify_type_constraint_error('$key', \$value, \$attrs[$index]->type_constraint) } }"; }