X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FMethod%2FAccessor.pm;h=eea250cf784469fda7f674b3b5e3bd055b79cea7;hb=9527a9d4bb7be669e243cffae1a361532f2ccd84;hp=e470b43258a220074b137465e3887f1171bc1ea9;hpb=230dd14a72d301932a9c10cd5121046bc50659ce;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Method/Accessor.pm b/lib/Mouse/Meta/Method/Accessor.pm old mode 100755 new mode 100644 index e470b43..eea250c --- a/lib/Mouse/Meta/Method/Accessor.pm +++ b/lib/Mouse/Meta/Method/Accessor.pm @@ -75,7 +75,7 @@ sub _generate_accessor_any{ $class->throw_error("Unknown accessor type '$type'"); } - if ($attribute->is_lazy) { + if ($attribute->is_lazy and $type ne 'wo') { my $value; if (defined $builder){ @@ -88,7 +88,7 @@ sub _generate_accessor_any{ $value = '$default'; } - $accessor .= "els" if $type eq 'rw' || $type eq 'wo'; + $accessor .= "els" if $type eq 'rw'; $accessor .= "if(!exists $slot){\n"; if($should_coerce){ $accessor .= "$slot = \$constraint->coerce($value)"; @@ -182,7 +182,7 @@ Mouse::Meta::Method::Accessor - A Mouse method generator for accessors =head1 VERSION -This document describes Mouse version 0.50_08 +This document describes Mouse version 0.71 =head1 SEE ALSO