Hi Todd, Chapter 9 (Associatives) of "Learning Perl 6" by brian d foy has a section on Maps, "the immutable mapping of zero or more keys to values". In that section there are subsections entitled 'Checking Keys', 'Creating from a Positional' and 'Checking Allowed Values.'
HTH, Bill. On Wed, Dec 4, 2019 at 12:41 AM ToddAndMargo via perl6-users <perl6-us...@perl.org> wrote: > > Hi All, > > I am cooking up something where I want top pass a value to a sub, but I > want to restrict what those values are. > > For instance, things like > > AbortRetryIgnore > CancelRetryContinue > Help > YesNo > Maybe > > And so on and so forth. > > If the wrong value is passed, I want the checker to crash > the sub. > > What is the best way of going about this? > > Many thanks, > -T