Make Role::Method::Required its own entity, since it is not actually a
[gitmo/Moose.git] / lib / Moose / Meta / Role / Method / Required.pm
index 2425d09..70e2186 100644 (file)
@@ -3,12 +3,21 @@ package Moose::Meta::Role::Method::Required;
 
 use strict;
 use warnings;
+use metaclass;
 
-our $VERSION   = '0.75_01';
+use overload '""'     => sub { shift->name },   # stringify to method name
+             fallback => 1;
+
+use base qw(Class::MOP::Object);
+
+our $VERSION   = '0.79';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
-use base 'Moose::Meta::Role::Method';
+# 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'));
 
 1;
 
@@ -24,7 +33,7 @@ Moose::Meta::Role::Method::Required - A Moose metaclass for required methods in
 
 =head1 BUGS
 
-All complex software has bugs lurking in it, and this module is no 
+All complex software has bugs lurking in it, and this module is no
 exception. If you find a bug please either email me, or add the bug
 to cpan-RT.