slotnames
[gitmo/Class-MOP.git] / lib / Class / MOP / Attribute.pm
index 3190a4b..bb41bd7 100644 (file)
@@ -112,6 +112,10 @@ sub default {
     $self->{default};
 }
 
+# slots
+
+sub slots { (shift)->name }
+
 # class association 
 
 sub attach_to_class {
@@ -432,6 +436,11 @@ As noted in the documentation for C<new> above, if the I<default>
 value is a CODE reference, this accessor will pass a single additional
 argument C<$instance> into it and return the value.
 
+=item B<slots>
+
+Returns a list of slots required by the attribute. This is usually 
+just one, which is the name of the attribute.
+
 =back
 
 =head2 Informational predicates