X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FTypeCoercion%2FUnion.pm;h=1eef306e29c8de97b3a1a3b8fa334fe2e056612e;hb=e000133868ec074e6b60baef47269c2d345adffc;hp=5a3b129d697c719cffcf7d2744465d313b5eff64;hpb=a7e9b05b9505cd4d2d642ead617de0eb7074e23f;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/TypeCoercion/Union.pm b/lib/Moose/Meta/TypeCoercion/Union.pm index 5a3b129..1eef306 100644 --- a/lib/Moose/Meta/TypeCoercion/Union.pm +++ b/lib/Moose/Meta/TypeCoercion/Union.pm @@ -5,10 +5,9 @@ use strict; use warnings; use metaclass; -use Carp 'confess'; use Scalar::Util 'blessed'; -our $VERSION = '0.55_04'; +our $VERSION = '0.57'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -19,8 +18,8 @@ sub compile_type_coercion { my $type_constraint = $self->type_constraint; (blessed $type_constraint && $type_constraint->isa('Moose::Meta::TypeConstraint::Union')) - || confess "You can only a Moose::Meta::TypeCoercion::Union for a " . - "Moose::Meta::TypeConstraint::Union, not a $type_constraint"; + || Moose->throw_error("You can only a Moose::Meta::TypeCoercion::Union for a " . + "Moose::Meta::TypeConstraint::Union, not a $type_constraint"); $self->_compiled_type_coercion(sub { my $value = shift; @@ -44,7 +43,7 @@ sub compile_type_coercion { sub has_coercion_for_type { 0 } sub add_type_coercions { - confess "Cannot add additional type coercions to Union types"; + Moose->throw_error("Cannot add additional type coercions to Union types"); } 1;