From: Jesse Luehrs Date: Mon, 27 Sep 2010 23:37:53 +0000 (-0500) Subject: hacks for ::Role::Method too X-Git-Tag: 1.15~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=630f7baadb64ebdf069c7ceb6fc86331618f60fa;p=gitmo%2FMoose.git hacks for ::Role::Method too --- diff --git a/lib/Moose/Meta/Role/Method.pm b/lib/Moose/Meta/Role/Method.pm index f813414..c876d53 100644 --- a/lib/Moose/Meta/Role/Method.pm +++ b/lib/Moose/Meta/Role/Method.pm @@ -10,6 +10,17 @@ our $AUTHORITY = 'cpan:STEVAN'; use base 'Moose::Meta::Method'; +sub _make_compatible_with { + my $self = shift; + my ($other) = @_; + + # XXX: this is pretty gross. the issue here is blah blah blah + # see the comments in CMOP::Method::Meta and CMOP::Method::Wrapped + return $self unless $other->_is_compatible_with($self->_real_ref_name); + + return $self->SUPER::_make_compatible_with(@_); +} + 1; __END__