X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole%2FMethod%2FRequired.pm;h=70e21868b17f79436b21dfc6fcad121102775137;hb=2cf88ade9c9c6a6751717a7eb3b4e8b721d17f69;hp=2425d09658ed075df5f3899b378da4b9ddb8e727;hpb=74397c13ad55fc865db34721aed512d4f605fadf;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role/Method/Required.pm b/lib/Moose/Meta/Role/Method/Required.pm index 2425d09..70e2186 100644 --- a/lib/Moose/Meta/Role/Method/Required.pm +++ b/lib/Moose/Meta/Role/Method/Required.pm @@ -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.