File Coverage

blib/lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Moose::Exception::ClassDoesNotHaveInitMeta;
2             our $VERSION = '2.2206';
3              
4 2     2   1292 use Moose;
  2         5  
  2         19  
5             extends 'Moose::Exception';
6             with 'Moose::Exception::Role::Class';
7              
8             has 'traits' => (
9             is => 'ro',
10             isa => 'ArrayRef',
11             required => 1
12             );
13              
14             sub _build_message {
15 2     2   6 my $self = shift;
16 2         67 my $class = $self->class_name;
17              
18 2         62 return "Cannot provide traits when $class does not have an init_meta() method";
19             }
20              
21             __PACKAGE__->meta->make_immutable;
22             1;