Checking in changes prior to tagging of version 0.93. Changelog diff is:
[gitmo/Moose.git] / lib / Moose / Meta / Role / Method / Required.pm
index f1680ba..0975173 100644 (file)
@@ -10,14 +10,17 @@ use overload '""'     => sub { shift->name },   # stringify to method name
 
 use base qw(Class::MOP::Object);
 
-our $VERSION   = '0.79';
+our $VERSION   = '0.93';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 # This is not a Moose::Meta::Role::Method because it has no implementation, it
 # is just a name
 
-__PACKAGE__->meta->add_attribute('name' => (reader => 'name'));
+__PACKAGE__->meta->add_attribute('name' => (
+    reader   => 'name',
+    required => 1,
+));
 
 sub new { shift->_new(@_) }
 
@@ -33,6 +36,34 @@ Moose::Meta::Role::Method::Required - A Moose metaclass for required methods in
 
 =head1 DESCRIPTION
 
+=head1 INHERITANCE
+
+C<Moose::Meta::Role::Method::Required> is a subclass of L<Class::MOP::Object>.
+It is B<not> a subclass of C<Moose::Meta::Role::Method> since it does not
+provide an implementation of the method.
+
+=head1 METHODS
+
+=over 4
+
+=item B<< Moose::Meta::Role::Method::Required->new(%options) >>
+
+This creates a new type constraint based on the provided C<%options>:
+
+=over 8
+
+=item * name
+
+The method name. This is required.
+
+=back
+
+=item B<< $method->name >>
+
+Returns the required method's name, as provided to the constructor.
+
+=back
+
 =head1 BUGS
 
 All complex software has bugs lurking in it, and this module is no