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.79';
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' => (reader => 'name'));
22 sub new { shift->_new(@_) }
32 Moose::Meta::Role::Method::Required - A Moose metaclass for required methods in Roles
38 C<Moose::Meta::Role::Method::Required> is a subclass of L<Class::MOP::Object>.
39 It is B<not> a subclass of C<Moose::Meta::Role::Method> since it does not
40 provide an implementation of the method.
46 =item B<< Moose::Meta::Role::Method::Required->new(%options) >>
48 This creates a new type constraint based on the provided C<%options>:
54 The method name. This is required.
58 =item B<< $method->name >>
60 Returns the required method's name, as provided to the constructor.
66 All complex software has bugs lurking in it, and this module is no
67 exception. If you find a bug please either email me, or add the bug
72 Stevan Little E<lt>stevan@iinteractive.comE<gt>
74 =head1 COPYRIGHT AND LICENSE
76 Copyright 2006-2009 by Infinity Interactive, Inc.
78 L<http://www.iinteractive.com>
80 This library is free software; you can redistribute it and/or modify
81 it under the same terms as Perl itself.