bump version to 0.62
[gitmo/Moose.git] / lib / Moose / Meta / Method / Augmented.pm
index 0ef4d34..5aa56f0 100644 (file)
@@ -3,15 +3,12 @@ package Moose::Meta::Method::Augmented;
 use strict;
 use warnings;
 
-our $VERSION   = '0.01';
+our $VERSION   = '0.62';
+$VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 use base 'Moose::Meta::Method';
 
-use Sub::Name;
-
-use Carp qw(confess);
-
 sub new {
     my ( $class, %args ) = @_;
 
@@ -25,7 +22,7 @@ sub new {
     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 ....
@@ -50,7 +47,11 @@ sub new {
     };
 
     # FIXME store additional attrs
-    $class->wrap($body);
+    $class->wrap(
+        $body,
+        package_name => $meta->name,
+        name         => $name
+    );
 }
 
 1;