From: Graham Knop Date: Fri, 22 Mar 2013 23:06:43 +0000 (-0400) Subject: fix for eager false non-ref defaults X-Git-Tag: v1.002000~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3b4c5799581f5f4ed56669f7b4690dcd2c21ce47;p=gitmo%2FMoo.git fix for eager false non-ref defaults --- diff --git a/lib/Method/Generate/Accessor.pm b/lib/Method/Generate/Accessor.pm index 2aad0e1..dc041ec 100644 --- a/lib/Method/Generate/Accessor.pm +++ b/lib/Method/Generate/Accessor.pm @@ -221,7 +221,7 @@ sub is_simple_set { sub has_eager_default { my ($self, $name, $spec) = @_; - (!$spec->{lazy} and ($spec->{default} or $spec->{builder})); + (!$spec->{lazy} and (exists $spec->{default} or $spec->{builder})); } sub _generate_get {