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 = '1.9900';
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 See L<Moose/BUGS> for details on reporting bugs.
73 Stevan Little E<lt>stevan@iinteractive.comE<gt>
75 =head1 COPYRIGHT AND LICENSE
77 Copyright 2006-2010 by Infinity Interactive, Inc.
79 L<http://www.iinteractive.com>
81 This library is free software; you can redistribute it and/or modify
82 it under the same terms as Perl itself.