Charles Alderman a écrit :

Now - and that's where the issue gets in the scene - if I add another
coercion for the DateTime subtype, but from another source, it won't
work :

Are you sure you haven't defined the coercion to "DateTime" from "Int" somewhere else?

Sure.

Find attached the test script:


$ perl multiple_coercions.t
The type coercion for 'DateTime' has already been registered at /usr/share/perl5/Moose/Util/TypeConstraints.pm line 289 Moose::Util::TypeConstraints::_install_type_coercions('DateTime', 'ARRAY(0x85350fc)') called at /usr/share/perl5/Moose/Util/TypeConstraints.pm line 218 Moose::Util::TypeConstraints::coerce('DateTime', 'Date', 'CODE(0x8479f60)') called at multiple_coercions.t line 35
# Looks like your test died before it could output anything.


        Alexis.

Reply via email to