merging the immutable branch into trunk
[gitmo/Class-MOP.git] / lib / Class / MOP / Method / Accessor.pm
index d55e233..1c03e31 100644 (file)
@@ -27,17 +27,17 @@ sub new {
         
     my $self = bless {
         # from our superclass
-        body          => undef,
+        '&!body'          => undef,
         # specific to this subclass
-        attribute     => $options{attribute},
-        is_inline     => ($options{is_inline} || 0),
-        accessor_type => $options{accessor_type},        
+        '$!attribute'     => $options{attribute},
+        '$!is_inline'     => ($options{is_inline} || 0),
+        '$!accessor_type' => $options{accessor_type},        
     } => $class;
     
     # we don't want this creating 
     # a cycle in the code, if not 
     # needed
-    weaken($self->{attribute});
+    weaken($self->{'$!attribute'});
     
     $self->intialize_body;
     
@@ -46,9 +46,9 @@ sub new {
 
 ## accessors
 
-sub associated_attribute { (shift)->{attribute}     }
-sub accessor_type        { (shift)->{accessor_type} }
-sub is_inline            { (shift)->{is_inline}     }
+sub associated_attribute { (shift)->{'$!attribute'}     }
+sub accessor_type        { (shift)->{'$!accessor_type'} }
+sub is_inline            { (shift)->{'$!is_inline'}     }
 
 ## factory 
 
@@ -62,7 +62,7 @@ sub intialize_body {
         ($self->is_inline ? 'inline' : ())
     );
     
-    eval { $self->{body} = $self->$method_name() };
+    eval { $self->{'&!body'} = $self->$method_name() };
     die $@ if $@;
 }