tests + fix for $obj->$code_ref notation that blew up
[gitmo/MooseX-Emulate-Class-Accessor-Fast.git] / lib / MooseX / Emulate / Class / Accessor / Fast.pm
index f87ca44..377eaa0 100644 (file)
@@ -234,8 +234,8 @@ sub make_accessor {
   my $writer = $attr->get_write_method_ref;
   return sub {
     my $self = shift;
-    return $self->$reader unless @_;
-    return $self->$writer((@_ > 1 ? [@_] : @_));
+    return $reader->($self) unless @_;
+    return $writer->($self,(@_ > 1 ? [@_] : @_));
   }
 }