this only matters for lazy attributes with initializers
Jesse Luehrs [Mon, 25 Apr 2011 07:21:14 +0000 (02:21 -0500)]
lib/Moose/Meta/Method/Accessor.pm

index 8601487..6ee2873 100644 (file)
@@ -63,7 +63,7 @@ sub _eval_environment {
 
     # XXX ugh, fix these
     $env->{'$attr'} = \$attr
-        if $attr->has_initializer;
+        if $attr->has_initializer && $attr->is_lazy;
     $env->{'$meta'} = \$self;
 
     return $env;