1 package Moose::Meta::Method;
7 $VERSION = eval $VERSION;
8 our $AUTHORITY = 'cpan:STEVAN';
10 use base 'Class::MOP::Method';
14 ( ref $self && $self->associated_metaclass ) || "Moose::Meta::Class";
19 my $inv = $self->_error_thrower;
20 unshift @_, "message" if @_ % 2 == 1;
21 unshift @_, method => $self if ref $self;
23 my $handler = $inv->can("throw_error");
24 goto $handler; # to avoid incrementing depth by 1
27 sub _inline_throw_error {
28 my ( $self, $msg, $args ) = @_;
29 "\$meta->throw_error($msg" . ($args ? ", $args" : "") . ")"; # FIXME makes deparsing *REALLY* hard
40 Moose::Meta::Method - A Moose Method metaclass
44 This class is a subclass of L<Class::MOP::Class> that provides
45 additional Moose-specific functionality, all of which is private.
47 To understand this class, you should read the the L<Class::MOP::Class>
52 C<Moose::Meta::Method> is a subclass of L<Class::MOP::Method>.
56 All complex software has bugs lurking in it, and this module is no
57 exception. If you find a bug please either email me, or add the bug
62 Stevan Little E<lt>stevan@iinteractive.comE<gt>
64 =head1 COPYRIGHT AND LICENSE
66 Copyright 2006-2009 by Infinity Interactive, Inc.
68 L<http://www.iinteractive.com>
70 This library is free software; you can redistribute it and/or modify
71 it under the same terms as Perl itself.