<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package Moose::Exception::RoleExclusionConflict;
our $VERSION = '2.2011';

use Moose;
extends 'Moose::Exception';
with 'Moose::Exception::Role::Role';

has 'roles' =&gt; (
    is         =&gt; 'ro',
    isa        =&gt; 'ArrayRef',
    required   =&gt; 1,
);

sub _build_message {
    my $self = shift;

    my @roles_array = @{$self-&gt;roles};
    my $role_noun = "Role".( @roles_array == 1 ? '' : 's');
    my $all_roles = join(', ', @roles_array);
    my $verb = "exclude".( @roles_array == 1 ? 's' : '' );
    my $role_name = $self-&gt;role_name;

    return "Conflict detected: $role_noun $all_roles $verb role '$role_name'";
}

__PACKAGE__-&gt;meta-&gt;make_immutable;
1;
</pre></body></html>