diff --git a/TODO b/TODO index d00dca658..1fc5ed510 100644 --- a/TODO +++ b/TODO @@ -81,12 +81,6 @@ method by that name, so it'll depend on the previous fix going in (so "has foo There's no actual reason for this not to work, and it gets asked often enough that we really should just do it at some point. -### use Sub::Identify instead of doing our own thing with `get_code_info` - -No idea why we stopped using Sub::Identify in the past, but there's no reason -not to do this. We have a bug fix in our version (the `isGV_with_GP` thing), so -this should be submitted to Sub::Identify first. - ## Needs Thought These are things we think are good ideas, but they need more fleshing out. diff --git a/dist.ini b/dist.ini index 80bd79560..2c729c081 100644 --- a/dist.ini +++ b/dist.ini @@ -301,8 +301,6 @@ code = s{^(note 'Checking Changes')}{if \(\(\$ENV\{TRAVIS_PULL_REQUEST\} \|\| '' ;authordep Scalar::Util = 1.19 Sub::Exporter = 0.980 ;authordep Sub::Exporter = 0.980 - Sub::Identify = 0 -;authordep Sub::Identify = 0 Sub::Name = 0.20 ;authordep Sub::Name = 0.20 Try::Tiny = 0.17 diff --git a/lib/Class/MOP/Mixin/HasOverloads.pm b/lib/Class/MOP/Mixin/HasOverloads.pm index 05faf1a62..c6a50e57f 100644 --- a/lib/Class/MOP/Mixin/HasOverloads.pm +++ b/lib/Class/MOP/Mixin/HasOverloads.pm @@ -8,7 +8,6 @@ use Class::MOP::Overload; use Devel::OverloadInfo 0.005 'overload_info', 'overload_op_info'; use Scalar::Util 'blessed'; -use Sub::Identify 'sub_name', 'stash_name'; use overload (); @@ -66,11 +65,12 @@ sub add_overloaded_operator { $overload = Class::MOP::Overload->new(%p); } elsif ( !blessed $overload) { + my ($coderef_package, $coderef_name) = Class::MOP::get_code_info($overload); $overload = Class::MOP::Overload->new( operator => $op, coderef => $overload, - coderef_name => sub_name($overload), - coderef_package => stash_name($overload), + coderef_name => $coderef_name, + coderef_package => $coderef_package, %p, ); }