More doc for Method::Conflicting
[gitmo/Moose.git] / lib / Moose / Meta / Role / Method / Conflicting.pm
1
2 package Moose::Meta::Role::Method::Conflicting;
3
4 use strict;
5 use warnings;
6
7 use base qw(Moose::Meta::Role::Method::Required);
8
9 our $VERSION   = '0.79';
10 $VERSION = eval $VERSION;
11 our $AUTHORITY = 'cpan:STEVAN';
12
13 __PACKAGE__->meta->add_attribute('roles' => (
14     reader   => 'roles',
15     required => 1,
16 ));
17
18 sub is_conflict { 1 }
19
20 1;
21
22 __END__
23
24 =pod
25
26 =head1 NAME
27
28 Moose::Meta::Role::Method::Conflicting - A Moose metaclass for conflicting methods in Roles
29
30 =head1 DESCRIPTION
31
32 =head1 INHERITANCE
33
34 C<Moose::Meta::Role::Method::Conflicting> is a subclass of
35 L<Moose::Meta::Role::Method::Required>.
36
37 =head1 METHODS
38
39 =over 4
40
41 =item B<< Moose::Meta::Role::Method::Conflicting->new(%options) >>
42
43 This creates a new type constraint based on the provided C<%options>:
44
45 =over 8
46
47 =item * name
48
49 The method name. This is required.
50
51 =item * roles
52
53 The list of role names that generated the conflict. This is required.
54
55 =back
56
57 =item B<< $method->name >>
58
59 Returns the conflicting method's name, as provided to the constructor.
60
61 =item B<< $method->roles >>
62
63 Returns the roles that generated this conflicting method, as provided to the
64 constructor.
65
66 =item B<< $method->is_conflict >>
67
68 Returns whether the method requirement is due to a conflict. By default for
69 this class, it's true.
70
71 =back
72
73 =head1 BUGS
74
75 All complex software has bugs lurking in it, and this module is no
76 exception. If you find a bug please either email me, or add the bug
77 to cpan-RT.
78
79 =head1 AUTHOR
80
81 Stevan Little E<lt>stevan@iinteractive.comE<gt>
82
83 =head1 COPYRIGHT AND LICENSE
84
85 Copyright 2006-2009 by Infinity Interactive, Inc.
86
87 L<http://www.iinteractive.com>
88
89 This library is free software; you can redistribute it and/or modify
90 it under the same terms as Perl itself.
91
92 =cut