Use postamble() insteead of MY::postamble()
[gitmo/Mouse.git] / lib / Mouse / Meta / Method.pm
CommitLineData
8e64d0fa 1package Mouse::Meta::Method;
bc69ee88 2use Mouse::Util qw(:meta); # enables strict and warnings
53875581 3
8e64d0fa 4use overload
5 '&{}' => 'body',
6 fallback => 1,
7;
8
9010458d 9sub wrap{
10 my $class = shift;
8e64d0fa 11
9010458d 12 return $class->_new(@_);
8e64d0fa 13}
14
9010458d 15sub _new{
16 my $class = shift;
17 return $class->meta->new_object(@_)
18 if $class ne __PACKAGE__;
19
20 return bless {@_}, $class;
21}
22
23sub body { $_[0]->{body} }
24sub name { $_[0]->{name} }
25sub package_name { $_[0]->{package} }
26sub associated_metaclass { $_[0]->{associated_metaclass} }
8e64d0fa 27
612d3e1a 28sub fully_qualified_name {
29 my $self = shift;
30 return $self->package_name . '::' . $self->name;
31}
8e64d0fa 32
331;
8e64d0fa 34__END__
1820fffe 35
36=head1 NAME
37
38Mouse::Meta::Method - A Mouse Method metaclass
39
a25ca8d6 40=head1 VERSION
41
034587d8 42This document describes Mouse version 0.40
a25ca8d6 43
1820fffe 44=head1 SEE ALSO
45
46L<Moose::Meta::Method>
47
31c5194b 48L<Class::MOP::Method>
49
1820fffe 50=cut