Use dzil Authority plugin - remove $AUTHORITY from code
[gitmo/Moose.git] / lib / Moose / Meta / Role / Method / Conflicting.pm
CommitLineData
eec8ca8a 1
bb153262 2package Moose::Meta::Role::Method::Conflicting;
eec8ca8a 3
4use strict;
5use warnings;
6
e893345e 7use Moose::Util;
8
eec8ca8a 9use base qw(Moose::Meta::Role::Method::Required);
10
44ed8891 11__PACKAGE__->meta->add_attribute('roles' => (
12 reader => 'roles',
13 required => 1,
14));
eec8ca8a 15
e893345e 16sub roles_as_english_list {
17 my $self = shift;
18 Moose::Util::english_list( map { q{'} . $_ . q{'} } @{ $self->roles } );
19}
20
eec8ca8a 211;
22
ad46f524 23# ABSTRACT: A Moose metaclass for conflicting methods in Roles
24
eec8ca8a 25__END__
26
27=pod
28
eec8ca8a 29=head1 DESCRIPTION
30
31=head1 INHERITANCE
32
bb153262 33C<Moose::Meta::Role::Method::Conflicting> is a subclass of
eec8ca8a 34L<Moose::Meta::Role::Method::Required>.
35
97403951 36=head1 METHODS
37
38=over 4
39
49f8f3e6 40=item B<< Moose::Meta::Role::Method::Conflicting->new(%options) >>
41
42This creates a new type constraint based on the provided C<%options>:
43
44=over 8
45
46=item * name
47
48The method name. This is required.
49
50=item * roles
51
52The list of role names that generated the conflict. This is required.
53
54=back
55
56=item B<< $method->name >>
57
58Returns the conflicting method's name, as provided to the constructor.
59
60=item B<< $method->roles >>
61
62Returns the roles that generated this conflicting method, as provided to the
63constructor.
64
e893345e 65=item B<< $method->roles_as_english_list >>
66
67Returns the roles that generated this conflicting method as an English list.
68
97403951 69=back
70
eec8ca8a 71=head1 BUGS
72
d4048ef3 73See L<Moose/BUGS> for details on reporting bugs.
eec8ca8a 74
eec8ca8a 75=cut