X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FMethod%2FOverriden.pm;h=3100d58e9f7cfc0f67f41a58a9106b0fbd669ae3;hb=df8260e9a27a9d7532a21525223975fcf8e26562;hp=12bae386c42d4867cdb90073bb4e3ad8926066a9;hpb=3f9e4b0a1ec1bd784d87282849b3d1e27e9be283;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Method/Overriden.pm b/lib/Moose/Meta/Method/Overriden.pm index 12bae38..3100d58 100644 --- a/lib/Moose/Meta/Method/Overriden.pm +++ b/lib/Moose/Meta/Method/Overriden.pm @@ -3,15 +3,12 @@ package Moose::Meta::Method::Overriden; use strict; use warnings; -our $VERSION = '0.01'; +our $VERSION = '0.63'; +$VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; use base 'Moose::Meta::Method'; -use Sub::Name; - -use Carp qw(confess); - sub new { my ( $class, %args ) = @_; @@ -26,7 +23,7 @@ sub new { my $super = $args{class}->find_next_method_by_name($name); (defined $super) - || confess "You cannot override '$name' because it has no super method"; + || $class->throw_error("You cannot override '$name' because it has no super method", data => $name); my $super_body = $super->body; @@ -42,7 +39,11 @@ sub new { # subname "${_super_package}::${name}", $method; # FIXME store additional attrs - $class->wrap($body); + $class->wrap( + $body, + package_name => $args{class}->name, + name => $name + ); } 1; @@ -78,7 +79,7 @@ to cpan-RT. =head1 AUTHOR -Stevan Little Estevan@iinteractive.comE +Yuval Kogman Enothingmuch@cpan.orgE =head1 COPYRIGHT AND LICENSE