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' => (
25 sub new { shift->_new(@_) }
37 Moose::Meta::Role::Method::Required - A Moose metaclass for required methods in Roles
43 C<Moose::Meta::Role::Method::Required> is a subclass of L<Class::MOP::Object>.
44 It is B<not> a subclass of C<Moose::Meta::Role::Method> since it does not
45 provide an implementation of the method.
51 =item B<< Moose::Meta::Role::Method::Required->new(%options) >>
53 This creates a new type constraint based on the provided C<%options>:
59 The method name. This is required.
63 =item B<< $method->name >>
65 Returns the required method's name, as provided to the constructor.
67 =item B<< $method->is_conflict >>
69 Returns whether the method requirement is due to a conflict. By default for
70 this class, it's false.
76 All complex software has bugs lurking in it, and this module is no
77 exception. If you find a bug please either email me, or add the bug
82 Stevan Little E<lt>stevan@iinteractive.comE<gt>
84 =head1 COPYRIGHT AND LICENSE
86 Copyright 2006-2009 by Infinity Interactive, Inc.
88 L<http://www.iinteractive.com>
90 This library is free software; you can redistribute it and/or modify
91 it under the same terms as Perl itself.