Include inherited roles in inlined does
Dave Rolsky [Fri, 10 Sep 2010 01:54:38 +0000 (20:54 -0500)]
lib/Moose/Meta/Method/Does.pm

index 25c5b25..642b5aa 100644 (file)
@@ -55,8 +55,8 @@ sub _initialize_body {
     $source .= ";\n" . 'return $does{$name} || 0';
     $source .= ";\n" . '}';
 
-    my %does
-        = map { $_->name => 1 } $self->associated_metaclass->calculate_all_roles;
+    my %does = map { $_->name => 1 }
+        $self->associated_metaclass->calculate_all_roles_with_inheritance;
 
     my ( $code, $e ) = $self->_compile_code(
         code        => $source,