From: Shawn M Moore Date: Sun, 18 May 2008 14:40:07 +0000 (+0000) Subject: Use sub_name and stash_name from Sub::Identify instead of building up and breaking... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ced523f2d0ce3cab1e4bb6c2c7756bb5fd5c0daf;p=gitmo%2FClass-MOP.git Use sub_name and stash_name from Sub::Identify instead of building up and breaking down a list --- diff --git a/lib/Class/MOP/Method.pm b/lib/Class/MOP/Method.pm index d241582..314b5ee 100644 --- a/lib/Class/MOP/Method.pm +++ b/lib/Class/MOP/Method.pm @@ -26,8 +26,8 @@ sub wrap { || confess "You must supply a CODE reference to bless, not (" . ($code || 'undef') . ")"; bless { '&!body' => $code, - '$!package_name' => $params{package_name} || (Class::MOP::get_code_info($code))[0], - '$!name' => $params{name} || (Class::MOP::get_code_info($code))[1], + '$!package_name' => $params{package_name} || Class::MOP::stash_name($code), + '$!name' => $params{name} || Class::MOP::sub_name($code), } => blessed($class) || $class; }