First page Back Continue Last page Overview Graphics
Coercions
WTF Just happened?
- we created a subtype called “Email”
- which is of type Str
- and validates as via Email::Valid (where { Email::Valid->address($_) eq $_ };)
- We coerced it
- from type Str
- to be validated via Email::Valid (via { scalar Email::Valid->address($_) };)