File Coverage

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


line stmt bran cond sub pod time code
1             package Moose::Exception::CouldNotEvalDestructor;
2             our $VERSION = '2.2203';
3              
4 1     1   501 use Moose;
  1         2  
  1         5  
5             extends 'Moose::Exception';
6              
7             has 'method_destructor_object' => (
8             is => 'ro',
9             isa => 'Moose::Meta::Method::Destructor',
10             required => 1
11             );
12              
13             has 'source' => (
14             is => 'ro',
15             isa => 'Str',
16             required => 1
17             );
18              
19             has 'error' => (
20             is => 'ro',
21             isa => 'Str',
22             required => 1
23             );
24              
25             sub _build_message {
26 1     1   2 my $self = shift;
27 1         25 my $error = $self->error;
28 1         25 my $source = $self->source;
29              
30 1         21 return "Could not eval the destructor :\n\n$source\n\nbecause :\n\n$error";
31             }
32              
33             __PACKAGE__->meta->make_immutable;
34             1;