X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FAttribute.pm;h=bb41bd7e0605bf8326f1f318c5b7887dd52810dc;hb=c57c8b10dc66355d65b7ef2aad88edd20d8adc21;hp=3190a4bc0c9a178a71702886b337e8772b5dcf79;hpb=fc3ddd1d180b39fdcde1f7169e14cfbc7fdf55de;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Attribute.pm b/lib/Class/MOP/Attribute.pm index 3190a4b..bb41bd7 100644 --- a/lib/Class/MOP/Attribute.pm +++ b/lib/Class/MOP/Attribute.pm @@ -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 above, if the I value is a CODE reference, this accessor will pass a single additional argument C<$instance> into it and return the value. +=item B + +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