Closed clsn closed 8 years ago
@clsn thanks!
I think there is a way to get the type restriction to accept a string or an array of strings - I'll need to RTFM a little to refresh my memory. I'll merge this now, and experiment with tighter type checking when I get a chance over the next few days.
I coded that suggestion you made: if you use an array instead of a string as the value in the character_substitutions array, it will pick one of those characters—OR the original, unchanged one—to be the substitute, the choice being made individually for each word. I put in some description in the POD that I hope isn't too confusing.
I had to relax the restriction in Types.pm to allow it to be a map to "Any"; is there a way to restrict it to Strings or Arrays?
Not sure I did this pull request right; it includes commits that are part of other pull requests too. Probably if you merge them in the right order it will all work out.