use strict;
use warnings;
-use Carp 'confess';
-
-our $VERSION = '0.54';
+our $VERSION = '1.05';
+$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
use base 'Moose::Meta::Method';
my $super = $meta->find_next_method_by_name($name);
(defined $super)
- || confess "You cannot augment '$name' because it has no super method";
+ || $meta->throw_error("You cannot augment '$name' because it has no super method", data => $name);
my $_super_package = $super->package_name;
- # BUT!,... if this is an overriden method ....
- if ($super->isa('Moose::Meta::Method::Overriden')) {
+ # BUT!,... if this is an overridden method ....
+ if ($super->isa('Moose::Meta::Method::Overridden')) {
# we need to be sure that we actually
# find the next method, which is not
# an 'override' method, the reason is
=head1 DESCRIPTION
-This class implements method augmenting logic for the L<Moose> C<augment> keyword.
+This class implements method augmentation logic for the L<Moose>
+C<augment> keyword.
+
+The augmentation subroutine reference will be invoked explicitly using
+the C<inner> keyword from the parent class's method definition.
-This involves setting up C<inner> for the superclass body, and dispatching to
-the superclass from the normal body.
+=head1 INHERITANCE
-The subclass definition (the augmentation itself) will be invoked explicitly
-using the C<inner> keyword from the parent class's method definition.
+C<Moose::Meta::Method::Augmented> is a subclass of L<Moose::Meta::Method>.
=head1 METHODS
=over 4
-=item B<new>
+=item B<< Moose::Meta::Method::Augmented->new(%options) >>
+
+This constructs a new object. It accepts the following options:
+
+=over 8
+
+=item * class
+
+The metaclass object for the class in which the augmentation is being
+declared. This option is required.
+
+=item * name
+
+The name of the method which we are augmenting. This method must exist
+in one of the class's superclasses. This option is required.
+
+=item * method
+
+The subroutine reference which implements the augmentation. This
+option is required.
+
+=back
=back
=head1 BUGS
-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.
+See L<Moose/BUGS> for details on reporting bugs.
=head1 AUTHOR
=head1 COPYRIGHT AND LICENSE
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2010 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>