From: Jesse Luehrs Date: Thu, 8 Mar 2012 04:32:17 +0000 (-0600) Subject: not sure how i ever expected that to work X-Git-Tag: 2.0500~24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f477bafab1c4c51e2e72c8db093bb8b412d33a12;p=gitmo%2FMoose.git not sure how i ever expected that to work --- diff --git a/lib/Class/MOP/Mixin/HasMethods.pm b/lib/Class/MOP/Mixin/HasMethods.pm index dd04fc0..bfea578 100644 --- a/lib/Class/MOP/Mixin/HasMethods.pm +++ b/lib/Class/MOP/Mixin/HasMethods.pm @@ -241,13 +241,13 @@ sub get_overloaded_operators { sub has_overloaded_operator { my $self = shift; my ($op) = @_; - return defined overload::Method($op); + return defined overload::Method($self->name, $op); } sub get_overloaded_operator { my $self = shift; my ($op) = @_; - my $body = overload::Method($op); + my $body = overload::Method($self->name, $op); return unless defined $body; return $self->_wrap_overload($op, $body); } @@ -255,7 +255,7 @@ sub get_overloaded_operator { sub add_overload { my $self = shift; my ($op, $body) = @_; - overload->import($op => $body); + $self->name->overload::OVERLOAD($op => $body); } sub _wrap_overload {