X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FTypeCoercion%2FUnion.pm;h=163000b60e4897daa0f8b57d85fa2c6560f64dc5;hb=fb175631f4f6e2449cbd0c84c95fdd136e9256a9;hp=31446f4cca057d1e8f6bfa72d24381eebd49e42f;hpb=3726f90575863aeadb6c96d67d1dbbd118df1c9b;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/TypeCoercion/Union.pm b/lib/Moose/Meta/TypeCoercion/Union.pm index 31446f4..163000b 100644 --- a/lib/Moose/Meta/TypeCoercion/Union.pm +++ b/lib/Moose/Meta/TypeCoercion/Union.pm @@ -8,7 +8,7 @@ use metaclass; use Carp 'confess'; use Scalar::Util 'blessed'; -our $VERSION = '0.01'; +our $VERSION = '0.56'; our $AUTHORITY = 'cpan:STEVAN'; use base 'Moose::Meta::TypeCoercion'; @@ -27,7 +27,7 @@ sub compile_type_coercion { # in the union, and check em ... foreach my $type (@{$type_constraint->type_constraints}) { # if they have a coercion first - if ($type->has_coercion) { + if ($type->has_coercion) { # then try to coerce them ... my $temp = $type->coerce($value); # and if they get something @@ -40,6 +40,12 @@ sub compile_type_coercion { }); } +sub has_coercion_for_type { 0 } + +sub add_type_coercions { + confess "Cannot add additional type coercions to Union types"; +} + 1; __END__ @@ -69,6 +75,10 @@ If you wish to use features at this depth, please come to the =item B +=item B + +=item B + =back =head1 BUGS @@ -83,11 +93,11 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -=cut \ No newline at end of file +=cut