bump version to 0.91
[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
113d3174 11our $VERSION = '0.91';
eec8ca8a 12$VERSION = eval $VERSION;
13our $AUTHORITY = 'cpan:STEVAN';
14
44ed8891 15__PACKAGE__->meta->add_attribute('roles' => (
16 reader => 'roles',
17 required => 1,
18));
eec8ca8a 19
e893345e 20sub roles_as_english_list {
21 my $self = shift;
22 Moose::Util::english_list( map { q{'} . $_ . q{'} } @{ $self->roles } );
23}
24
eec8ca8a 251;
26
27__END__
28
29=pod
30
31=head1 NAME
32
bb153262 33Moose::Meta::Role::Method::Conflicting - A Moose metaclass for conflicting methods in Roles
eec8ca8a 34
35=head1 DESCRIPTION
36
37=head1 INHERITANCE
38
bb153262 39C<Moose::Meta::Role::Method::Conflicting> is a subclass of
eec8ca8a 40L<Moose::Meta::Role::Method::Required>.
41
97403951 42=head1 METHODS
43
44=over 4
45
49f8f3e6 46=item B<< Moose::Meta::Role::Method::Conflicting->new(%options) >>
47
48This creates a new type constraint based on the provided C<%options>:
49
50=over 8
51
52=item * name
53
54The method name. This is required.
55
56=item * roles
57
58The list of role names that generated the conflict. This is required.
59
60=back
61
62=item B<< $method->name >>
63
64Returns the conflicting method's name, as provided to the constructor.
65
66=item B<< $method->roles >>
67
68Returns the roles that generated this conflicting method, as provided to the
69constructor.
70
e893345e 71=item B<< $method->roles_as_english_list >>
72
73Returns the roles that generated this conflicting method as an English list.
74
97403951 75=back
76
eec8ca8a 77=head1 BUGS
78
79All complex software has bugs lurking in it, and this module is no
80exception. If you find a bug please either email me, or add the bug
81to cpan-RT.
82
83=head1 AUTHOR
84
85Stevan Little E<lt>stevan@iinteractive.comE<gt>
86
87=head1 COPYRIGHT AND LICENSE
88
89Copyright 2006-2009 by Infinity Interactive, Inc.
90
91L<http://www.iinteractive.com>
92
93This library is free software; you can redistribute it and/or modify
94it under the same terms as Perl itself.
95
96=cut