diff options
Diffstat (limited to 'lib/Moose/Exception/CoercionAlreadyExists.pm')
-rw-r--r-- | lib/Moose/Exception/CoercionAlreadyExists.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Moose/Exception/CoercionAlreadyExists.pm b/lib/Moose/Exception/CoercionAlreadyExists.pm new file mode 100644 index 0000000..53342d8 --- /dev/null +++ b/lib/Moose/Exception/CoercionAlreadyExists.pm @@ -0,0 +1,19 @@ +package Moose::Exception::CoercionAlreadyExists; +our $VERSION = '2.1405'; + +use Moose; +extends 'Moose::Exception'; +with 'Moose::Exception::Role::Instance'; + +has 'constraint_name' => ( + is => 'ro', + isa => 'Str', + required => 1 +); + +sub _build_message { + my $self = shift; + "A coercion action already exists for '".$self->constraint_name."'"; +} + +1; |