From: Dave Rolsky Date: Sat, 1 Nov 2008 16:31:27 +0000 (+0000) Subject: Remove a bunch of commented out code (all tests still pass with 5.10.0 & 5.8.8) X-Git-Tag: 0.61~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=31a0f74d6845bf0302f9f6f4d150c310bb403aa7;p=gitmo%2FMoose.git Remove a bunch of commented out code (all tests still pass with 5.10.0 & 5.8.8) --- diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index a9aa8ad..97ef77d 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -224,33 +224,19 @@ sub get_method_map { my ($pkg, $name) = Class::MOP::get_code_info($code); - if ($pkg->can('meta') - # NOTE: - # we don't know what ->meta we are calling - # here, so we need to be careful cause it - # just might blow up at us, or just complain - # loudly (in the case of Curses.pm) so we - # just be a little overly cautious here. - # - SL - && eval { no warnings; blessed($pkg->meta) } - && $pkg->meta->isa('Moose::Meta::Role')) { - #my $role = $pkg->meta->name; - #next unless $self->does_role($role); - } - else { - - # NOTE: - # in 5.10 constant.pm the constants show up - # as being in the right package, but in pre-5.10 - # they show up as constant::__ANON__ so we - # make an exception here to be sure that things - # work as expected in both. - # - SL - unless ($pkg eq 'constant' && $name eq '__ANON__') { - next if ($pkg || '') ne $class_name || - (($name || '') ne '__ANON__' && ($pkg || '') ne $class_name); - } - + # NOTE: + # in 5.10 constant.pm the constants show up + # as being in the right package, but in pre-5.10 + # they show up as constant::__ANON__ so we + # make an exception here to be sure that things + # work as expected in both. + # - SL + unless ( $pkg eq 'constant' && $name eq '__ANON__' ) { + next + if ( $pkg || '' ) ne $class_name + || ( ( $name || '' ) ne '__ANON__' + && ( $pkg || '' ) ne $class_name + ); } $map->{$symbol} = $method_metaclass->wrap(