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.2203';
3              
4 3     3   1779 use Moose;
  3         7  
  3         22  
5             extends 'Moose::Exception';
6             with 'Moose::Exception::Role::Class';
7              
8 3     3   25 use Moose::Util 'find_meta';
  3         7  
  3         23  
9              
10             has 'metaclass' => (
11             is => 'ro',
12             isa => 'Str',
13             required => 1
14             );
15              
16             sub _build_message {
17 3     3   8 my $self = shift;
18 3         238 my $class = find_meta( $self->class_name );
19 3         90 $self->class_name." already has a metaclass, but it does not inherit ".$self->metaclass." ($class).";
20             }
21              
22             __PACKAGE__->meta->make_immutable;
23             1;