Avoid a warning when the inherited method has no uninlined body (which
Dave Rolsky [Tue, 30 Jun 2009 04:09:06 +0000 (23:09 -0500)]
is weird but seems to happen in some bizarro cases).

lib/Class/MOP/Method/Inlined.pm

index 3d50dc8..ea50a74 100644 (file)
@@ -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;
         }