blob: aabec96ad0a1e8ac8ba9a0a51df6d4c2ee608c03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion;
our $VERSION = '2.1405';
use Moose;
extends 'Moose::Exception';
with 'Moose::Exception::Role::InvalidAttributeOptions', 'Moose::Exception::Role::TypeConstraint';
sub _build_message {
my $self = shift;
my $name = $self->attribute_name;
my $type = $self->type_name;
return "You cannot coerce an attribute ($name) unless its type ($type) has a coercion";
}
1;
|