Inline calculate_all_roles_with_inheritance when making class immutable
Dave Rolsky [Fri, 10 Sep 2010 01:56:41 +0000 (20:56 -0500)]
lib/Moose/Meta/Class/Immutable/Trait.pm

index ec40256..60f6832 100644 (file)
@@ -19,6 +19,12 @@ sub calculate_all_roles {
     @{ $self->{__immutable}{calculate_all_roles} ||= [ $self->$orig ] };
 }
 
+sub calculate_all_roles_with_inheritance {
+    my $orig = shift;
+    my $self = shift;
+    @{ $self->{__immutable}{calculate_all_roles_with_inheritance} ||= [ $self->$orig ] };
+}
+
 1;
 
 __END__