use warnings;
use metaclass;
-use Carp 'confess';
use Scalar::Util 'blessed';
-our $VERSION = '0.56';
+our $VERSION = '0.71_01';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
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;
sub has_coercion_for_type { 0 }
sub add_type_coercions {
- confess "Cannot add additional type coercions to Union types";
+ require Moose;
+ Moose->throw_error("Cannot add additional type coercions to Union types");
}
1;
=head1 COPYRIGHT AND LICENSE
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>