File Coverage

blib/lib/Moose/Exception/IncompatibleMetaclassOfSuperclass.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 11 11 100.0


line stmt bran cond sub pod time code
1             package Moose::Exception::IncompatibleMetaclassOfSuperclass;
2             our $VERSION = '2.2205';
3              
4 3     3   3094 use Moose;
  3         14  
  3         25  
5             extends 'Moose::Exception';
6             with 'Moose::Exception::Role::Class';
7              
8             has [qw/superclass_name superclass_meta_type class_meta_type/] => (
9             is => 'ro',
10             isa => 'Str',
11             required => 1,
12             );
13              
14             sub _build_message {
15 6     6   10 my $self = shift;
16 6         200 my $class_name = $self->class_name;
17 6         221 my $class_meta_type = $self->class_meta_type;
18 6         212 my $superclass_name = $self->superclass_name;
19 6         231 my $supermeta_type = $self->superclass_meta_type;
20              
21 6         166 return "The metaclass of $class_name ($class_meta_type)" .
22             " is not compatible with the metaclass of its superclass, " .
23             "$superclass_name ($supermeta_type)";
24             }
25              
26             __PACKAGE__->meta->make_immutable;
27             1;