line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Exception::RoleExclusionConflict; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2203'; |
3
|
|
|
|
|
|
|
|
4
|
3
|
|
|
3
|
|
1572
|
use Moose; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
25
|
|
5
|
|
|
|
|
|
|
extends 'Moose::Exception'; |
6
|
|
|
|
|
|
|
with 'Moose::Exception::Role::Role'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has 'roles' => ( |
9
|
|
|
|
|
|
|
is => 'ro', |
10
|
|
|
|
|
|
|
isa => 'ArrayRef', |
11
|
|
|
|
|
|
|
required => 1, |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _build_message { |
15
|
6
|
|
|
6
|
|
12
|
my $self = shift; |
16
|
|
|
|
|
|
|
|
17
|
6
|
|
|
|
|
9
|
my @roles_array = @{$self->roles}; |
|
6
|
|
|
|
|
180
|
|
18
|
6
|
100
|
|
|
|
39
|
my $role_noun = "Role".( @roles_array == 1 ? '' : 's'); |
19
|
6
|
|
|
|
|
19
|
my $all_roles = join(', ', @roles_array); |
20
|
6
|
100
|
|
|
|
22
|
my $verb = "exclude".( @roles_array == 1 ? 's' : '' ); |
21
|
6
|
|
|
|
|
192
|
my $role_name = $self->role_name; |
22
|
|
|
|
|
|
|
|
23
|
6
|
|
|
|
|
150
|
return "Conflict detected: $role_noun $all_roles $verb role '$role_name'"; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
27
|
|
|
|
|
|
|
1; |