From: Graham Knop Date: Sun, 17 Mar 2013 22:21:01 +0000 (-0400) Subject: fix asserter generator not passing $spec X-Git-Tag: v1.002000~38 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e2a29181c48ea896e39d4def98dbc24c8767345;p=gitmo%2FMoo.git fix asserter generator not passing $spec --- diff --git a/lib/Method/Generate/Accessor.pm b/lib/Method/Generate/Accessor.pm index 594c81c..e5ca31d 100644 --- a/lib/Method/Generate/Accessor.pm +++ b/lib/Method/Generate/Accessor.pm @@ -538,7 +538,7 @@ sub _generate_asserter { "do {\n" ." my \$val = ".$self->_generate_get($name, $spec).";\n" - ." unless (".$self->_generate_simple_has('$_[0]', $name).") {\n" + ." unless (".$self->_generate_simple_has('$_[0]', $name, $spec).") {\n" .qq! die "Attempted to access '${name}' but it is not set";\n! ." }\n" ." \$val;\n"