bbusschots / hsxkpasswd

A Perl module and terminal command for generating secure memorable passwords inspired by the fabulous XKCD web comic and Steve Gibson's Password Hay Stacks. This is the library that powers www.xkpasswd.net
http://www.bartb.ie/xkpasswd
BSD 2-Clause "Simplified" License
278 stars 48 forks source link

Multisubs #24

Closed clsn closed 8 years ago

clsn commented 8 years ago

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.

bbusschots commented 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.