X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FMethod%2FAccessor.pm;h=cb3e910e9290bf2c85cc1f1a92840cc16c170c78;hp=be8d9ffd274a76cd8398ed26803c0146b9171614;hb=267711f78bd79835875f805447d3ab802a18f0c4;hpb=2a96ea8598dea995d57fa05e73cf2d42cf567e28 diff --git a/lib/Mouse/Meta/Method/Accessor.pm b/lib/Mouse/Meta/Method/Accessor.pm index be8d9ff..cb3e910 100755 --- a/lib/Mouse/Meta/Method/Accessor.pm +++ b/lib/Mouse/Meta/Method/Accessor.pm @@ -1,5 +1,7 @@ package Mouse::Meta::Method::Accessor; use Mouse::Util qw(:meta); # enables strict and warnings +use warnings FATAL => 'recursion'; + sub _inline_slot{ my(undef, $self_var, $attr_name) = @_; @@ -49,7 +51,7 @@ sub _generate_accessor_any{ $accessor .= "\n". '$compiled_type_constraint->('.$value.') or - $attribute->verify_type_constraint_error('.$value.', $constraint);' . "\n"; + $attribute->_throw_type_constraint_error('.$value.', $constraint);' . "\n"; } # if there's nothing left to do for the attribute we can return during @@ -96,7 +98,7 @@ sub _generate_accessor_any{ $accessor .= "my \$tmp = $value;\n"; $accessor .= "\$compiled_type_constraint->(\$tmp)"; - $accessor .= " || \$attribute->verify_type_constraint_error(\$tmp, \$constraint);\n"; + $accessor .= " || \$attribute->_throw_type_constraint_error(\$tmp, \$constraint);\n"; $accessor .= "$slot = \$tmp;\n"; } else{ @@ -176,7 +178,7 @@ Mouse::Meta::Method::Accessor - A Mouse method generator for accessors =head1 VERSION -This document describes Mouse version 0.44 +This document describes Mouse version 0.4501 =head1 SEE ALSO