From: Yuval Kogman Date: Sat, 17 Jan 2009 22:02:37 +0000 (+0000) Subject: use _compile_code in Accessor X-Git-Tag: 0.65~20^2~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e2df402c2b1b0b698cab2da76c9778dec3f2733a;p=gitmo%2FMoose.git use _compile_code in Accessor --- diff --git a/lib/Moose/Meta/Method/Accessor.pm b/lib/Moose/Meta/Method/Accessor.pm index 920871d..dfb46c9 100644 --- a/lib/Moose/Meta/Method/Accessor.pm +++ b/lib/Moose/Meta/Method/Accessor.pm @@ -35,7 +35,7 @@ sub _eval_code { }; #warn "code for $attr_name =>\n" . $code . "\n"; - $self->_eval_closure($environment, $self->_prepare_code( code => $code ) ) + $self->_compile_code( environment => $environment, code => $code ) or $self->throw_error("Could not create writer for '${\$self->associated_attribute->name}' because $@ \n code: $code", error => $@, data => $code ); }