Remove p6 style attribute naming
[gitmo/Class-MOP.git] / lib / Class / MOP / Method / Accessor.pm
index bf06963..afa4340 100644 (file)
@@ -30,19 +30,19 @@ sub new {
 
     my $self = bless {
         # from our superclass
-        '&!body'          => undef,
-        '$!package_name' => $options{package_name},
-        '$!name'         => $options{name},        
+        'body'          => undef,
+        'package_name' => $options{package_name},
+        'name'         => $options{name},        
         # 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->initialize_body;
 
@@ -51,8 +51,8 @@ sub new {
 
 ## accessors
 
-sub associated_attribute { (shift)->{'$!attribute'}     }
-sub accessor_type        { (shift)->{'$!accessor_type'} }
+sub associated_attribute { (shift)->{'attribute'}     }
+sub accessor_type        { (shift)->{'accessor_type'} }
 
 ## factory
 
@@ -66,7 +66,7 @@ sub initialize_body {
         ($self->is_inline ? 'inline' : ())
     );
 
-    eval { $self->{'&!body'} = $self->$method_name() };
+    eval { $self->{'body'} = $self->$method_name() };
     die $@ if $@;
 }