X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FMethod.pm;h=cbe349aa561c20ed0de1f0cd45478587c77da64f;hp=a64dce819739f643aa6c55bcc0e2124220db6c14;hb=1820fffecb0bd1da64edc16ecde534178b841d14;hpb=bc71de540020f1b2b75bafd69e2021c103e1c4e3 diff --git a/lib/Mouse/Meta/Method.pm b/lib/Mouse/Meta/Method.pm index a64dce8..cbe349a 100755 --- a/lib/Mouse/Meta/Method.pm +++ b/lib/Mouse/Meta/Method.pm @@ -2,6 +2,8 @@ package Mouse::Meta::Method; use strict; use warnings; +use Mouse::Util qw(:meta); + use overload '&{}' => 'body', fallback => 1, @@ -13,11 +15,21 @@ sub new{ return bless \%args, $class; } -sub body { $_[0]->{body} } -sub name { $_[0]->{name} } -sub package{ $_[0]->{name} } +sub body { $_[0]->{body} } +sub name { $_[0]->{name} } +sub package_name{ $_[0]->{package} } 1; __END__ + +=head1 NAME + +Mouse::Meta::Method - A Mouse Method metaclass + +=head1 SEE ALSO + +L + +=cut