2 package Moose::Meta::Role::Method::Required;
8 use overload '""' => sub { shift->name }, # stringify to method name
11 use base qw(Class::MOP::Object);
13 # This is not a Moose::Meta::Role::Method because it has no implementation, it
16 __PACKAGE__->meta->add_attribute('name' => (
19 Class::MOP::_definition_context(),
22 sub new { shift->_new(@_) }
26 # ABSTRACT: A Moose metaclass for required methods in Roles
36 C<Moose::Meta::Role::Method::Required> is a subclass of L<Class::MOP::Object>.
37 It is B<not> a subclass of C<Moose::Meta::Role::Method> since it does not
38 provide an implementation of the method.
44 =item B<< Moose::Meta::Role::Method::Required->new(%options) >>
46 This creates a new type constraint based on the provided C<%options>:
52 The method name. This is required.
56 =item B<< $method->name >>
58 Returns the required method's name, as provided to the constructor.
64 See L<Moose/BUGS> for details on reporting bugs.