1package Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass; 2our $VERSION = '2.2201'; 3 4use Moose; 5extends 'Moose::Exception'; 6with 'Moose::Exception::Role::Class'; 7 8use Moose::Util 'find_meta'; 9 10has 'metaclass' => ( 11 is => 'ro', 12 isa => 'Str', 13 required => 1 14); 15 16sub _build_message { 17 my $self = shift; 18 my $class = find_meta( $self->class_name ); 19 $self->class_name." already has a metaclass, but it does not inherit ".$self->metaclass." ($class)."; 20} 21 22__PACKAGE__->meta->make_immutable; 231; 24