X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FMethod%2FAccessor.pm;h=be8d9ffd274a76cd8398ed26803c0146b9171614;hb=2a96ea8598dea995d57fa05e73cf2d42cf567e28;hp=d727650e7b4563d9fe5607c2d47461041a7dc20b;hpb=4c0fe06fa87e7c2c4ed1666e77ed52ae020f19d7;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Method/Accessor.pm b/lib/Mouse/Meta/Method/Accessor.pm index d727650..be8d9ff 100755 --- a/lib/Mouse/Meta/Method/Accessor.pm +++ b/lib/Mouse/Meta/Method/Accessor.pm @@ -23,7 +23,7 @@ sub _generate_accessor_any{ my $self = '$_[0]'; my $slot = $method_class->_inline_slot($self, $name);; - my $accessor = sprintf(qq{package %s;\n#line 1 "%s for %s (%s)"\n}, $class->name, $type, $name, __FILE__) + my $accessor = sprintf(qq{package %s;\n#line 1 "%s-accessor for %s (%s)"\n}, $class->name, $type, $name, __FILE__) . "sub {\n"; if ($type eq 'rw' || $type eq 'wo') { @@ -49,7 +49,7 @@ sub _generate_accessor_any{ $accessor .= "\n". '$compiled_type_constraint->('.$value.') or - $attribute->verify_type_constraint_error($name, '.$value.', $constraint);' . "\n"; + $attribute->verify_type_constraint_error('.$value.', $constraint);' . "\n"; } # if there's nothing left to do for the attribute we can return during @@ -96,7 +96,7 @@ sub _generate_accessor_any{ $accessor .= "my \$tmp = $value;\n"; $accessor .= "\$compiled_type_constraint->(\$tmp)"; - $accessor .= " || \$attribute->verify_type_constraint_error(\$name, \$tmp, \$constraint);\n"; + $accessor .= " || \$attribute->verify_type_constraint_error(\$tmp, \$constraint);\n"; $accessor .= "$slot = \$tmp;\n"; } else{ @@ -176,7 +176,7 @@ Mouse::Meta::Method::Accessor - A Mouse method generator for accessors =head1 VERSION -This document describes Mouse version 0.41 +This document describes Mouse version 0.44 =head1 SEE ALSO