2 package Moose::Meta::Role::Method::Conflicting;
9 use base qw(Moose::Meta::Role::Method::Required);
11 __PACKAGE__->meta->add_attribute('roles' => (
14 Class::MOP::_definition_context(),
17 sub roles_as_english_list {
19 Moose::Util::english_list( map { q{'} . $_ . q{'} } @{ $self->roles } );
24 # ABSTRACT: A Moose metaclass for conflicting methods in Roles
34 C<Moose::Meta::Role::Method::Conflicting> is a subclass of
35 L<Moose::Meta::Role::Method::Required>.
41 =item B<< Moose::Meta::Role::Method::Conflicting->new(%options) >>
43 This creates a new type constraint based on the provided C<%options>:
49 The method name. This is required.
53 The list of role names that generated the conflict. This is required.
57 =item B<< $method->name >>
59 Returns the conflicting method's name, as provided to the constructor.
61 =item B<< $method->roles >>
63 Returns the roles that generated this conflicting method, as provided to the
66 =item B<< $method->roles_as_english_list >>
68 Returns the roles that generated this conflicting method as an English list.
74 See L<Moose/BUGS> for details on reporting bugs.