Skip to content

Commit

Permalink
make this private
Browse files Browse the repository at this point in the history
  • Loading branch information
doy committed Aug 6, 2013
1 parent 89d5f65 commit 01f692b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
7 changes: 1 addition & 6 deletions lib/Moose/Meta/Class.pm
Expand Up @@ -212,7 +212,7 @@ sub calculate_all_roles {
grep { !$seen{$_->name}++ } map { $_->calculate_all_roles } @{ $self->roles };
}

sub roles_with_inheritance {
sub _roles_with_inheritance {
my $self = shift;
my %seen;
grep { !$seen{$_->name}++ }
Expand Down Expand Up @@ -942,11 +942,6 @@ This adds an C<override> method modifier to the package.
This adds an C<augment> method modifier to the package.
=item B<< $metaclass->roles_with_inheritance >>
This will return a list of C<Moose::Meta::Role> instances which are directly
consumed by this class or any class that it inherits from.
=item B<< $metaclass->calculate_all_roles >>
This will return a unique array of C<Moose::Meta::Role> instances
Expand Down
8 changes: 4 additions & 4 deletions lib/Moose/Util.pm
Expand Up @@ -345,17 +345,17 @@ sub _role_differences {
$_->isa('Moose::Meta::Role::Composite')
? (@{ $_->get_roles })
: ($_)
} $super_meta_name->meta->can('roles_with_inheritance')
? $super_meta_name->meta->roles_with_inheritance
} $super_meta_name->meta->can('_roles_with_inheritance')
? $super_meta_name->meta->_roles_with_inheritance
: $super_meta_name->meta->can('roles')
? @{ $super_meta_name->meta->roles }
: ();
my @role_metas = map {
$_->isa('Moose::Meta::Role::Composite')
? (@{ $_->get_roles })
: ($_)
} $class_meta_name->meta->can('roles_with_inheritance')
? $class_meta_name->meta->roles_with_inheritance
} $class_meta_name->meta->can('_roles_with_inheritance')
? $class_meta_name->meta->_roles_with_inheritance
: $class_meta_name->meta->can('roles')
? @{ $class_meta_name->meta->roles }
: ();
Expand Down

0 comments on commit 01f692b

Please sign in to comment.