summaryrefslogtreecommitdiff
path: root/lib/Moose/Exception/CannotAddAsAnAttributeToARole.pm
blob: 960d56c467b12763d5c298f8d8b088827fd4e6a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package Moose::Exception::CannotAddAsAnAttributeToARole;
our $VERSION = '2.1405';

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

has 'attribute_class' => (
    is       => 'ro',
    isa      => 'Str',
    required => 1,
);

sub _build_message {
    my $self = shift;
    "Cannot add a ".$self->attribute_class." as an attribute to a role";
}

1;