This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Looks like overloaded &{} doesn't work with after_parse in either of Text::CSV_{PP,XS} | |
# so need to use \&{...} to get a real coderef. That's not a huge problem. | |
# This will die on any row that breaks the constraint... | |
after_parse => \&{ Tuple[Str, Str, Int, Bool, Optional[Num]] } | |
# This will skip on any row that breaks the constraint... | |
after_parse => sub { | |
state $type = Tuple[Str, Str, Int, Bool, Optional[Num]]; | |
state $check = $type->compiled_check; |