2 package Moose::Meta::Role::Method::Required;
8 use overload '""' => sub { shift->name }, # stringify to method name
11 use base qw(Class::MOP::Object);
13 our $VERSION = '0.86';
14 $VERSION = eval $VERSION;
15 our $AUTHORITY = 'cpan:STEVAN';
17 # This is not a Moose::Meta::Role::Method because it has no implementation, it
20 __PACKAGE__->meta->add_attribute('name' => (
25 sub new { shift->_new(@_) }
35 Moose::Meta::Role::Method::Required - A Moose metaclass for required methods in Roles
41 C<Moose::Meta::Role::Method::Required> is a subclass of L<Class::MOP::Object>.
42 It is B<not> a subclass of C<Moose::Meta::Role::Method> since it does not
43 provide an implementation of the method.
49 =item B<< Moose::Meta::Role::Method::Required->new(%options) >>
51 This creates a new type constraint based on the provided C<%options>:
57 The method name. This is required.
61 =item B<< $method->name >>
63 Returns the required method's name, as provided to the constructor.
69 All complex software has bugs lurking in it, and this module is no
70 exception. If you find a bug please either email me, or add the bug
75 Stevan Little E<lt>stevan@iinteractive.comE<gt>
77 =head1 COPYRIGHT AND LICENSE
79 Copyright 2006-2009 by Infinity Interactive, Inc.
81 L<http://www.iinteractive.com>
83 This library is free software; you can redistribute it and/or modify
84 it under the same terms as Perl itself.