push @{$self->roles} => $role;
}
+sub calculate_all_roles {
+ my $self = shift;
+ my %seen;
+ grep { !$seen{$_->name}++ } map { $_->calculate_all_roles } @{ $self->roles };
+}
+
sub does_role {
my ($self, $role_name) = @_;
(defined $role_name)
push @{$self->get_roles} => $role;
}
+sub calculate_all_roles {
+ my $self = shift;
+ my %seen;
+ grep { !$seen{$_->name}++ } $self, map { $_->calculate_all_roles } @{ $self->get_roles };
+}
+
sub does_role {
my ($self, $role_name) = @_;
(defined $role_name)
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
-=cut
\ No newline at end of file
+=cut