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

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

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

sub _build_message {
    my $self = shift;
    my $class_name = $self->class_name;
    my $superclass = $self->superclass_name;

    return "Can't make $class_name compatible with metaclass $superclass";
}

1;