You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although not explicitly stated in Type::Tiny::Manual::CoercionsType::Tiny based coercion requires that the class you want to coerce to is previously loaded, otherwise you get a exception like
Can't locate object method "parse" via package "Foo" (perhaps you forgot to load "Foo"?) at compiled coercion 'to_Name' line 1.
Although not explicitly stated in Type::Tiny::Manual::Coercions
Type::Tiny
based coercion requires that the class you want to coerce to is previously loaded, otherwise you get a exception likeCan't locate object method "parse" via package "Foo" (perhaps you forgot to load "Foo"?) at compiled coercion 'to_Name' line 1.
Params::Coerce
has a different philosophy Loading-Classes.How to tell
Type::Tiny
to load the class you want to coerce to at run-time?The text was updated successfully, but these errors were encountered: