From: Dave Rolsky Date: Tue, 30 Jun 2009 04:09:06 +0000 (-0500) Subject: Avoid a warning when the inherited method has no uninlined body (which X-Git-Tag: 0.89~21 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9d61c6b1cf517ec84a82b1a57f05da8ac332c655;p=gitmo%2FClass-MOP.git Avoid a warning when the inherited method has no uninlined body (which is weird but seems to happen in some bizarro cases). --- diff --git a/lib/Class/MOP/Method/Inlined.pm b/lib/Class/MOP/Method/Inlined.pm index 3d50dc8..ea50a74 100644 --- a/lib/Class/MOP/Method/Inlined.pm +++ b/lib/Class/MOP/Method/Inlined.pm @@ -77,7 +77,8 @@ sub can_be_inlined { # otherwise we have to check that the actual method is an inlined # version of what we're expecting if ( $inherited_method->isa(__PACKAGE__) ) { - if ( refaddr( $inherited_method->_uninlined_body ) + if ( $inherited_method->_uninlined_body + && refaddr( $inherited_method->_uninlined_body ) == refaddr($expected_method) ) { return 1; }