File Coverage

blib/lib/Moose/Exception/MetaclassIsNotASubclassOfGivenMetaclass.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


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