blib/lib/Moose/Exception/AttributeConflictInSummation.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
_build_message
1.0
CRAP 1.0
« blib/lib/Moose/Exception/AttributeConflictInRoles.pm ↑ Summary blib/lib/Moose/Exception/AttributeExtensionIsNotSupportedInRoles.pm »
1 package Moose::Exception::AttributeConflictInSummation;
2 3 our $VERSION = '2.4001';
3  
4 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 extends 'Moose::Exception';
6 3 with 'Moose::Exception::Role::Role', 'Moose::Exception::Role::AttributeName';
7  
8 3 has 'second_role_name' => (
9 is => 'ro',
10 isa => 'Str',
11 required => 1,
12 );
13  
14 6 ▶sub _build_message {
Subroutine _build_message: called CC=1 SCAR=0.0
15 6 my $self = shift;
16  
17 6 my $role1 = $self->role_name;
18 6 my $role2 = $self->second_role_name;
19 6 my $attr_name = $self->attribute_name;
20  
21 6 return "We have encountered an attribute conflict with '$attr_name'"
22 . " during role composition. "
23 . " This attribute is defined in both $role1 and $role2."
24 . " This is a fatal error and cannot be disambiguated.";
25 }
26  
27 3 __PACKAGE__->meta->make_immutable;
28 3 1;
« blib/lib/Moose/Exception/AttributeConflictInRoles.pm ↑ Summary blib/lib/Moose/Exception/AttributeExtensionIsNotSupportedInRoles.pm »