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