0.85
* Moose::Meta::Attribute
- The warning for 'no associated methods' is now split out into the
- check_associated_methods method, so that extensions can safely call
+ _check_associated_methods method, so that extensions can safely call
'after install_accessors => ...'. (hdp)
0.84 Fri, Jun 26, 2009
return;
}
-sub check_associated_methods {
+sub _check_associated_methods {
my $self = shift;
unless (
@{ $self->associated_methods }
Use 'bare' when you are deliberately not installing any methods
(accessor, reader, etc.) associated with this attribute; otherwise,
Moose will issue a deprecation warning when this attribute is added to a
-metaclass. See L</check_associated_methods>.
+metaclass.
=item * isa => $type
attribute's type constraint. If the value is not valid, it throws an
error.
-=item B<< $attr->check_associated_methods >>
-
-This method makes sure that either an explicit C<< is => 'bare' >> was passed
-to the attribute's constructor or that the attribute has at least one
-associated method (reader, writer, delegation, etc.). Otherwise, it issues a
-warning.
-
=item B<< $attr->handles >>
This returns the value of the C<handles> option passed to the
$self->SUPER::add_attribute($attr);
# it may be a Class::MOP::Attribute, theoretically, which doesn't have
# 'bare' and doesn't implement this method
- if ($attr->can('check_associated_methods')) {
- $attr->check_associated_methods;
+ if ($attr->can('_check_associated_methods')) {
+ $attr->_check_associated_methods;
}
return $attr;
}