summaryrefslogtreecommitdiff
path: root/lib/Moose/Exception/CanExtendOnlyClasses.pm
blob: 9519aed63b785c0eab967ea5d314bbf579fed81f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package Moose::Exception::CanExtendOnlyClasses;
our $VERSION = '2.1405';

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

sub _build_message {
    my $self      = shift;
    my $role_name = $self->role_name;
    return "You cannot inherit from a Moose Role ($role_name)";
}

1;