use _compile_code in Accessor
Yuval Kogman [Sat, 17 Jan 2009 22:02:37 +0000 (22:02 +0000)]
lib/Moose/Meta/Method/Accessor.pm

index 920871d..dfb46c9 100644 (file)
@@ -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 );
 }