bump version to 0.91
[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
113d3174 13our $VERSION = '0.91';
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
2ee514b1 20__PACKAGE__->meta->add_attribute('name' => (
21 reader => 'name',
22 required => 1,
23));
d67145ed 24
bc336e8e 25sub new { shift->_new(@_) }
26
faa0f968 271;
28
29__END__
30
31=pod
32
33=head1 NAME
34
35Moose::Meta::Role::Method::Required - A Moose metaclass for required methods in Roles
36
37=head1 DESCRIPTION
38
d7a5a659 39=head1 INHERITANCE
40
41C<Moose::Meta::Role::Method::Required> is a subclass of L<Class::MOP::Object>.
42It is B<not> a subclass of C<Moose::Meta::Role::Method> since it does not
43provide an implementation of the method.
44
45=head1 METHODS
46
47=over 4
48
49=item B<< Moose::Meta::Role::Method::Required->new(%options) >>
50
51This creates a new type constraint based on the provided C<%options>:
52
53=over 8
54
55=item * name
56
57The method name. This is required.
58
59=back
60
61=item B<< $method->name >>
62
63Returns the required method's name, as provided to the constructor.
64
65=back
66
faa0f968 67=head1 BUGS
68
d03bd989 69All complex software has bugs lurking in it, and this module is no
faa0f968 70exception. If you find a bug please either email me, or add the bug
71to cpan-RT.
72
73=head1 AUTHOR
74
75Stevan Little E<lt>stevan@iinteractive.comE<gt>
76
77=head1 COPYRIGHT AND LICENSE
78
2840a3b2 79Copyright 2006-2009 by Infinity Interactive, Inc.
faa0f968 80
81L<http://www.iinteractive.com>
82
83This library is free software; you can redistribute it and/or modify
84it under the same terms as Perl itself.
85
07b0f1a5 86=cut