From: Dave Rolsky Date: Fri, 10 Sep 2010 01:56:41 +0000 (-0500) Subject: Inline calculate_all_roles_with_inheritance when making class immutable X-Git-Tag: 1.13~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5a5fd3c07f028265393a6278993cb35e39b3e10f;p=gitmo%2FMoose.git Inline calculate_all_roles_with_inheritance when making class immutable --- diff --git a/lib/Moose/Meta/Class/Immutable/Trait.pm b/lib/Moose/Meta/Class/Immutable/Trait.pm index ec40256..60f6832 100644 --- a/lib/Moose/Meta/Class/Immutable/Trait.pm +++ b/lib/Moose/Meta/Class/Immutable/Trait.pm @@ -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__