bump version to 0.94
[gitmo/Class-MOP.git] / lib / Class / MOP / Package.pm
index ec1aedd..f6d4261 100644 (file)
@@ -8,7 +8,7 @@ use Scalar::Util 'blessed', 'reftype';
 use Carp         'confess';
 use Sub::Name    'subname';
 
-our $VERSION   = '0.93';
+our $VERSION   = '0.94';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -379,12 +379,11 @@ sub get_method {
         }
     );
 
-    # we should never have a blessed map entry but no $code in the package
-    if ( blessed( $map_entry ) && !$code ) {
-        my $method = sprintf '%s::%s', $self->name, $method_name;
-        confess "Found a meta method object in the method map but no"
-            . " corresponding code entry in the symbol table for $method";
-    }
+    # This seems to happen in some weird cases where methods modifiers are
+    # added via roles or some other such bizareness. Honestly, I don't totally
+    # understand this, but returning the entry works, and keeps various MX
+    # modules from blowing up. - DR
+    return $map_entry if blessed $map_entry && !$code;
 
     return $map_entry if blessed $map_entry && $map_entry->body == $code;