fall back to calculate_all_roles here so role metas can use it
Jesse Luehrs [Mon, 27 Sep 2010 02:29:47 +0000 (21:29 -0500)]
lib/Moose/Util.pm

index bbdc931..de6a954 100644 (file)
@@ -320,9 +320,13 @@ sub _role_differences {
     my ($class_meta_name, $super_meta_name) = @_;
     my @super_role_metas = $super_meta_name->meta->can('calculate_all_roles_with_inheritance')
                          ? $super_meta_name->meta->calculate_all_roles_with_inheritance
+                         : $super_meta_name->meta->can('calculate_all_roles')
+                         ? $super_meta_name->meta->calculate_all_roles
                          : ();
     my @role_metas       = $class_meta_name->meta->can('calculate_all_roles_with_inheritance')
                          ? $class_meta_name->meta->calculate_all_roles_with_inheritance
+                         : $class_meta_name->meta->can('calculate_all_roles')
+                         ? $class_meta_name->meta->calculate_all_roles
                          : ();
     my @differences;
     for my $role_meta (@role_metas) {